Commit 4c03ee73 authored by Mark Salter's avatar Mark Salter Committed by Linus Torvalds

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: default avatarMark Salter <msalter@redhat.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 004731b2
...@@ -264,7 +264,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka, ...@@ -264,7 +264,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka,
/* this is the X/Open sanctioned signal stack switching. */ /* this is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) { if (ka->sa.sa_flags & SA_ONSTACK) {
if (!on_sig_stack(sp)) if (sas_ss_flags(sp) == 0)
sp = current->sas_ss_sp + current->sas_ss_size; sp = current->sas_ss_sp + current->sas_ss_size;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment