Hexagon: check to if we will overflow the signal stack
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
This commit is contained in:
parent
a11e67c261
commit
9cdae82d14
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
|
||||||
{
|
{
|
||||||
unsigned long sp = regs->r29;
|
unsigned long sp = regs->r29;
|
||||||
|
|
||||||
|
/* check if we would overflow the alt stack */
|
||||||
|
if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
|
||||||
|
return (void __user __force *)-1UL;
|
||||||
|
|
||||||
/* Switch to signal stack if appropriate */
|
/* Switch to signal stack if appropriate */
|
||||||
if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
|
if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
|
||||||
sp = current->sas_ss_sp + current->sas_ss_size;
|
sp = current->sas_ss_sp + current->sas_ss_size;
|
||||||
|
|
Loading…
Add table
Reference in a new issue