aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
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/alpha
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/alpha')
-rw-r--r--arch/alpha/kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index d00583161574..bbd37536d14e 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -14,6 +14,7 @@
14#include <linux/user.h> 14#include <linux/user.h>
15#include <linux/slab.h> 15#include <linux/slab.h>
16#include <linux/security.h> 16#include <linux/security.h>
17#include <linux/signal.h>
17 18
18#include <asm/uaccess.h> 19#include <asm/uaccess.h>
19#include <asm/pgtable.h> 20#include <asm/pgtable.h>
@@ -335,7 +336,7 @@ do_sys_ptrace(long request, long pid, long addr, long data,
335 /* continue and stop at next (return from) syscall */ 336 /* continue and stop at next (return from) syscall */
336 case PTRACE_CONT: /* restart after signal. */ 337 case PTRACE_CONT: /* restart after signal. */
337 ret = -EIO; 338 ret = -EIO;
338 if ((unsigned long) data > _NSIG) 339 if (!valid_signal(data))
339 break; 340 break;
340 if (request == PTRACE_SYSCALL) 341 if (request == PTRACE_SYSCALL)
341 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 342 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
@@ -365,7 +366,7 @@ do_sys_ptrace(long request, long pid, long addr, long data,
365 366
366 case PTRACE_SINGLESTEP: /* execute single instruction. */ 367 case PTRACE_SINGLESTEP: /* execute single instruction. */
367 ret = -EIO; 368 ret = -EIO;
368 if ((unsigned long) data > _NSIG) 369 if (!valid_signal(data))
369 break; 370 break;
370 /* Mark single stepping. */ 371 /* Mark single stepping. */
371 child->thread_info->bpt_nsaved = -1; 372 child->thread_info->bpt_nsaved = -1;