summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorJesper Juhl2005-05-01 17:59:14 +0200
committerLinus Torvalds2005-05-01 17:59:14 +0200
commit7ed20e1ad521b5f5df61bf6559ae60738e393741 (patch)
tree90931724e45eaedb3445314e8b94e78253642395 /kernel/futex.c
parent[PATCH] new valid_signal() function (diff)
downloadkernel-qcow2-linux-7ed20e1ad521b5f5df61bf6559ae60738e393741.tar.gz
kernel-qcow2-linux-7ed20e1ad521b5f5df61bf6559ae60738e393741.tar.xz
kernel-qcow2-linux-7ed20e1ad521b5f5df61bf6559ae60738e393741.zip
[PATCH] convert that currently tests _NSIG directly to use valid_signal()
Convert most of the current code that uses _NSIG directly to instead use valid_signal(). This avoids gcc -W warnings and off-by-one errors. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 7b54a672d0ad..c7130f86106c 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -39,6 +39,7 @@
#include <linux/mount.h>
#include <linux/pagemap.h>
#include <linux/syscalls.h>
+#include <linux/signal.h>
#define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8)
@@ -654,7 +655,7 @@ static int futex_fd(unsigned long uaddr, int signal)
int ret, err;
ret = -EINVAL;
- if (signal < 0 || signal > _NSIG)
+ if (!valid_signal(signal))
goto out;
ret = get_unused_fd();