diff options
author | Laurent MEYER <meyerlau@fr.ibm.com> | 2006-06-23 05:05:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:05 -0400 |
commit | d09042da7284a86ffbdd18695f517a71514ed598 (patch) | |
tree | 09e9a3de71a4a4cf6c8f8cb0c40ec0a916e01cae /arch/frv | |
parent | 785d55708c24c28d7646f3d1fe6c9f82fb714311 (diff) |
[PATCH] fix incorrect SA_ONSTACK behaviour for 64-bit processes
- When setting a sighandler using sigaction() call, if the flag
SA_ONSTACK is set and no alternate stack is provided via sigaltstack(),
the kernel still try to install the alternate stack. This behavior is
the opposite of the one which is documented in Single Unix Specifications
V3.
- Also when setting an alternate stack using sigaltstack() with the flag
SS_DISABLE, the kernel try to install the alternate stack on signal
delivery.
These two use cases makes the process crash at signal delivery.
Signed-off-by: Laurent Meyer <meyerlau@fr.ibm.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/kernel/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index dd5e6fdd85fd..b8a5882b8625 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -233,7 +233,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka, | |||
233 | 233 | ||
234 | /* This is the X/Open sanctioned signal stack switching. */ | 234 | /* This is the X/Open sanctioned signal stack switching. */ |
235 | if (ka->sa.sa_flags & SA_ONSTACK) { | 235 | if (ka->sa.sa_flags & SA_ONSTACK) { |
236 | if (! on_sig_stack(sp)) | 236 | if (! sas_ss_flags(sp)) |
237 | sp = current->sas_ss_sp + current->sas_ss_size; | 237 | sp = current->sas_ss_sp + current->sas_ss_size; |
238 | } | 238 | } |
239 | 239 | ||