From 9df794d9275d41012909aaff3cab759e37871974 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 02:11:49 -0500 Subject: cris: don't leave ->uc_stack unitialized - we'll use its contents on sigreturn Signed-off-by: Al Viro --- arch/cris/arch-v10/kernel/signal.c | 2 ++ arch/cris/arch-v32/kernel/signal.c | 1 + 2 files changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 187237f655e6..9570946a6958 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c @@ -356,6 +356,8 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); + err |= __save_altstack(&frame->uc.uc_stack, rdusp()); + if (err) goto give_sigsegv; diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 168b6958e2b8..1f29c692b7ef 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c @@ -365,6 +365,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext)); err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); + err |= __save_altstack(&frame->uc.uc_stack, rdusp()); if (err) goto give_sigsegv; -- cgit v1.2.2