aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/kernel/ptrace.c
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/m32r/kernel/ptrace.c
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/m32r/kernel/ptrace.c')
-rw-r--r--arch/m32r/kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 8b40f362dd6f..124f7c1b775e 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -24,6 +24,7 @@
24#include <linux/ptrace.h> 24#include <linux/ptrace.h>
25#include <linux/user.h> 25#include <linux/user.h>
26#include <linux/string.h> 26#include <linux/string.h>
27#include <linux/signal.h>
27 28
28#include <asm/cacheflush.h> 29#include <asm/cacheflush.h>
29#include <asm/io.h> 30#include <asm/io.h>
@@ -665,7 +666,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
665 case PTRACE_SYSCALL: 666 case PTRACE_SYSCALL:
666 case PTRACE_CONT: 667 case PTRACE_CONT:
667 ret = -EIO; 668 ret = -EIO;
668 if ((unsigned long) data > _NSIG) 669 if (!valid_signal(data))
669 break; 670 break;
670 if (request == PTRACE_SYSCALL) 671 if (request == PTRACE_SYSCALL)
671 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 672 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
@@ -700,7 +701,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
700 unsigned long pc, insn; 701 unsigned long pc, insn;
701 702
702 ret = -EIO; 703 ret = -EIO;
703 if ((unsigned long) data > _NSIG) 704 if (!valid_signal(data))
704 break; 705 break;
705 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 706 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
706 if ((child->ptrace & PT_DTRACE) == 0) { 707 if ((child->ptrace & PT_DTRACE) == 0) {