]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86_64: never block forced SIGSEGV
authorRoland McGrath <roland@redhat.com>
Thu, 23 Jun 2005 07:08:37 +0000 (00:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:13 +0000 (09:45 -0700)
commit17e94b0ca3d94b4e5a4c9190f5941b6a49f41614
treef91a3a4725a2e59ed3cfce4cabd31f61798b9342
parent853911b5e1d7824c1df359c12a2ff79b790ed92c
[PATCH] x86_64: never block forced SIGSEGV

This is the x86_64 version of the signal fix I just posted for i386.

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>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/ia32/ia32_signal.c
arch/x86_64/kernel/signal.c