diff options
author | Mark Salter <msalter@redhat.com> | 2010-01-08 17:43:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-11 12:34:07 -0500 |
commit | 4c03ee7352f2f0ee393c7190ce0b758dd1217f57 (patch) | |
tree | 8f81d66cee3cd2a061664d3544b58b2362aa62e2 /arch/mn10300/kernel | |
parent | 004731b2c7c658d36bee167cb1e1a399c2cbccc9 (diff) |
mn10300: signal stack fix
This fixes a signal stack handling problem in the MN10300 arch. When new
threads are cloned with CLONE_VM, they don't inherit the alternate signal
stack. They do share the signal flags, though. When deciding whether to
use an alternate stack, the arch code needs to check to make sure the task
struct contains a valid alternate stack. This patch fixes the MN10300
arch by using the sas_ss_flags() test provided by sched.h rather than the
on_sig_stack() test which is insufficient by itself.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r-- | arch/mn10300/kernel/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index a21f43bc68e2..717db14c2cc3 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -264,7 +264,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka, | |||
264 | 264 | ||
265 | /* this is the X/Open sanctioned signal stack switching. */ | 265 | /* this is the X/Open sanctioned signal stack switching. */ |
266 | if (ka->sa.sa_flags & SA_ONSTACK) { | 266 | if (ka->sa.sa_flags & SA_ONSTACK) { |
267 | if (!on_sig_stack(sp)) | 267 | if (sas_ss_flags(sp) == 0) |
268 | sp = current->sas_ss_sp + current->sas_ss_size; | 268 | sp = current->sas_ss_sp + current->sas_ss_size; |
269 | } | 269 | } |
270 | 270 | ||