• Paul Mackerras's avatar
    [PATCH] ppc64: fix signal mask restoration when delivery fails · d45c791c
    Paul Mackerras authored
    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: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    d45c791c
signal32.c 28.1 KB