diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 20:52:33 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 20:52:33 +0300 |
commit | 69f061e0c2ed47304b3eeac7fb7bd5268652dc50 (patch) | |
tree | 69bca9d5c7e7eb5e79dae030cbce713686e4d209 /include/linux/sched.h | |
parent | 607781762e7aae9c976f0a9a8829d4ba3e2da4ab (diff) | |
parent | f84d49b218b7d4c6cba2e0b41f24bd4045403962 (diff) | |
download | linux-69f061e0c2ed47304b3eeac7fb7bd5268652dc50.tar.xz |
Merge branch 'core-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
signal: Print warning message when dropping signals
signal: Fix alternate signal stack check
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 49be8f7c05f6..882dc48163b4 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) return info <= SEND_SIG_FORCED; } -/* True if we are on the alternate signal stack. */ - +/* + * True if we are on the alternate signal stack. + */ static inline int on_sig_stack(unsigned long sp) { - return (sp - current->sas_ss_sp < current->sas_ss_size); +#ifdef CONFIG_STACK_GROWSUP + return sp >= current->sas_ss_sp && + sp - current->sas_ss_sp < current->sas_ss_size; +#else + return sp > current->sas_ss_sp && + sp - current->sas_ss_sp <= current->sas_ss_size; +#endif } static inline int sas_ss_flags(unsigned long sp) |