[PATCH] i386: never block forced SIGSEGV
authorRoland McGrath <roland@redhat.com>
Thu, 23 Jun 2005 07:08:21 +0000 (00:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:09 +0000 (09:45 -0700)
commita3a77e33706a1fd086cbd147cf1ac08c705383a4
tree0175c6babb39233a5cbbdf3c8ca9027180f580ed
parentbe4113c2fefaf895bab8321ae7ed10fa3750ea1e
[PATCH] i386: never block forced SIGSEGV

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: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/signal.c