diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 93851bcd9584..eb8da36e13df 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mempolicy.h> | 27 | #include <linux/mempolicy.h> |
28 | #include <linux/cpuset.h> | 28 | #include <linux/cpuset.h> |
29 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
30 | #include <linux/signal.h> | ||
30 | 31 | ||
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <asm/unistd.h> | 33 | #include <asm/unistd.h> |
@@ -277,7 +278,7 @@ void set_special_pids(pid_t session, pid_t pgrp) | |||
277 | */ | 278 | */ |
278 | int allow_signal(int sig) | 279 | int allow_signal(int sig) |
279 | { | 280 | { |
280 | if (sig < 1 || sig > _NSIG) | 281 | if (!valid_signal(sig) || sig < 1) |
281 | return -EINVAL; | 282 | return -EINVAL; |
282 | 283 | ||
283 | spin_lock_irq(¤t->sighand->siglock); | 284 | spin_lock_irq(¤t->sighand->siglock); |
@@ -298,7 +299,7 @@ EXPORT_SYMBOL(allow_signal); | |||
298 | 299 | ||
299 | int disallow_signal(int sig) | 300 | int disallow_signal(int sig) |
300 | { | 301 | { |
301 | if (sig < 1 || sig > _NSIG) | 302 | if (!valid_signal(sig) || sig < 1) |
302 | return -EINVAL; | 303 | return -EINVAL; |
303 | 304 | ||
304 | spin_lock_irq(¤t->sighand->siglock); | 305 | spin_lock_irq(¤t->sighand->siglock); |