diff --git a/include/linux/sched.h b/include/linux/sched.h index 6fc8f45de4e912f1196d07a5ace4d4cc752ebe3f..8f983293b403da8e06db1778a5e37f6dc4d9479e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2305,6 +2305,17 @@ static inline int sas_ss_flags(unsigned long sp) : on_sig_stack(sp) ? SS_ONSTACK : 0); } +static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) +{ + if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp)) +#ifdef CONFIG_STACK_GROWSUP + return current->sas_ss_sp; +#else + return current->sas_ss_sp + current->sas_ss_size; +#endif + return sp; +} + /* * Routines for handling mm_structs */