aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/hexagon/kernel/signal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c
index 8a20e8ed5d7d..097623c0c4b4 100644
--- a/arch/hexagon/kernel/signal.c
+++ b/arch/hexagon/kernel/signal.c
@@ -41,6 +41,10 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
41{ 41{
42 unsigned long sp = regs->r29; 42 unsigned long sp = regs->r29;
43 43
44 /* check if we would overflow the alt stack */
45 if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
46 return (void __user __force *)-1UL;
47
44 /* Switch to signal stack if appropriate */ 48 /* Switch to signal stack if appropriate */
45 if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0)) 49 if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
46 sp = current->sas_ss_sp + current->sas_ss_size; 50 sp = current->sas_ss_sp + current->sas_ss_size;