diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 75e6e60bf583..0f67914a43c9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2086,11 +2086,18 @@ static inline int is_si_special(const struct siginfo *info) | |||
2086 | return info <= SEND_SIG_FORCED; | 2086 | return info <= SEND_SIG_FORCED; |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | /* True if we are on the alternate signal stack. */ | 2089 | /* |
2090 | 2090 | * True if we are on the alternate signal stack. | |
2091 | */ | ||
2091 | static inline int on_sig_stack(unsigned long sp) | 2092 | static inline int on_sig_stack(unsigned long sp) |
2092 | { | 2093 | { |
2093 | return (sp - current->sas_ss_sp < current->sas_ss_size); | 2094 | #ifdef CONFIG_STACK_GROWSUP |
2095 | return sp >= current->sas_ss_sp && | ||
2096 | sp - current->sas_ss_sp < current->sas_ss_size; | ||
2097 | #else | ||
2098 | return sp > current->sas_ss_sp && | ||
2099 | sp - current->sas_ss_sp <= current->sas_ss_size; | ||
2100 | #endif | ||
2094 | } | 2101 | } |
2095 | 2102 | ||
2096 | static inline int sas_ss_flags(unsigned long sp) | 2103 | static inline int sas_ss_flags(unsigned long sp) |