[PATCH] ppc64: fix signal mask restoration when delivery fails
This is the third of 3 patches from David Woodhouse which fix various problems with signal handling on ppc64. At present, if a signal is being delivered, and the process has specified delivery of that signal on an alternate stack but the alternate stack that has been specified is invalid (i.e. the kernel gets a fault writing to the alternate stack), then we (correctly) give the process a SIGSEGV but we put the wrong signal mask in the saved state on the stack - i.e. we put the mask that would have been established for the original signal handler there. This patch fixes it by making setup_rt_frame, handle_rt_signal32 and handle_signal32 return a status code to indicate whether they successfully established a stack frame. If they fail, the caller doesn't block the signals specified for the signal handler. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment