diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-05-01 11:59:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:14 -0400 |
commit | 7ed20e1ad521b5f5df61bf6559ae60738e393741 (patch) | |
tree | 90931724e45eaedb3445314e8b94e78253642395 /arch/cris/arch-v10 | |
parent | e5bdd883a189243541e7a132385580703b049102 (diff) |
[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 'arch/cris/arch-v10')
-rw-r--r-- | arch/cris/arch-v10/kernel/ptrace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index da15db8ae482..581ecabaae53 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/ptrace.h> | 11 | #include <linux/ptrace.h> |
12 | #include <linux/user.h> | 12 | #include <linux/user.h> |
13 | #include <linux/signal.h> | ||
13 | 14 | ||
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | #include <asm/page.h> | 16 | #include <asm/page.h> |
@@ -184,7 +185,7 @@ sys_ptrace(long request, long pid, long addr, long data) | |||
184 | case PTRACE_CONT: | 185 | case PTRACE_CONT: |
185 | ret = -EIO; | 186 | ret = -EIO; |
186 | 187 | ||
187 | if ((unsigned long) data > _NSIG) | 188 | if (!valid_signal(data)) |
188 | break; | 189 | break; |
189 | 190 | ||
190 | if (request == PTRACE_SYSCALL) { | 191 | if (request == PTRACE_SYSCALL) { |
@@ -219,7 +220,7 @@ sys_ptrace(long request, long pid, long addr, long data) | |||
219 | case PTRACE_SINGLESTEP: | 220 | case PTRACE_SINGLESTEP: |
220 | ret = -EIO; | 221 | ret = -EIO; |
221 | 222 | ||
222 | if ((unsigned long) data > _NSIG) | 223 | if (!valid_signal(data)) |
223 | break; | 224 | break; |
224 | 225 | ||
225 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 226 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |