aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-05-01 11:59:14 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:59:14 -0400
commit7ed20e1ad521b5f5df61bf6559ae60738e393741 (patch)
tree90931724e45eaedb3445314e8b94e78253642395 /arch/frv/kernel
parente5bdd883a189243541e7a132385580703b049102 (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/frv/kernel')
-rw-r--r--arch/frv/kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index 2a0efb739adc..cbe03cba9f02 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -20,6 +20,7 @@
20#include <linux/user.h> 20#include <linux/user.h>
21#include <linux/config.h> 21#include <linux/config.h>
22#include <linux/security.h> 22#include <linux/security.h>
23#include <linux/signal.h>
23 24
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25#include <asm/page.h> 26#include <asm/page.h>
@@ -239,7 +240,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
239 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ 240 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
240 case PTRACE_CONT: /* restart after signal. */ 241 case PTRACE_CONT: /* restart after signal. */
241 ret = -EIO; 242 ret = -EIO;
242 if ((unsigned long) data > _NSIG) 243 if (!valid_signal(data))
243 break; 244 break;
244 if (request == PTRACE_SYSCALL) 245 if (request == PTRACE_SYSCALL)
245 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 246 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
@@ -267,7 +268,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
267 268
268 case PTRACE_SINGLESTEP: /* set the trap flag. */ 269 case PTRACE_SINGLESTEP: /* set the trap flag. */
269 ret = -EIO; 270 ret = -EIO;
270 if ((unsigned long) data > _NSIG) 271 if (!valid_signal(data))
271 break; 272 break;
272 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 273 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
273 ptrace_enable(child); 274 ptrace_enable(child);