• Roland McGrath's avatar
    [PATCH] i386: never block forced SIGSEGV · 7c1def16
    Roland McGrath authored
    This problem was first noticed on PPC and has already been fixed there.
    But the exact same issue applies to other platforms in the same way.  The
    signal blocking for sa_mask and the handled signal takes place after the
    handler setup.  When the stack is bogus, the handler setup forces a
    SIGSEGV.  But then this will be blocked, and returning to user mode will
    fault again and iterate.  This patch fixes the problem by checking whether
    signal handler setup failed, and not doing the signal-blocking if so.  This
    copies what was done in the ppc code.  I think all architectures' signal
    handler setup code follows this pattern and needs the change.
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7c1def16
signal.c 16.9 KB