diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6fc8f45de4e9..8f983293b403 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2305,6 +2305,17 @@ static inline int sas_ss_flags(unsigned long sp) | |||
2305 | : on_sig_stack(sp) ? SS_ONSTACK : 0); | 2305 | : on_sig_stack(sp) ? SS_ONSTACK : 0); |
2306 | } | 2306 | } |
2307 | 2307 | ||
2308 | static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig) | ||
2309 | { | ||
2310 | if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp)) | ||
2311 | #ifdef CONFIG_STACK_GROWSUP | ||
2312 | return current->sas_ss_sp; | ||
2313 | #else | ||
2314 | return current->sas_ss_sp + current->sas_ss_size; | ||
2315 | #endif | ||
2316 | return sp; | ||
2317 | } | ||
2318 | |||
2308 | /* | 2319 | /* |
2309 | * Routines for handling mm_structs | 2320 | * Routines for handling mm_structs |
2310 | */ | 2321 | */ |