aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
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/um
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/um')
-rw-r--r--arch/um/kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 3a99ee6d94eb..e50e60ff5d27 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -143,7 +143,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
143 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ 143 case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
144 case PTRACE_CONT: { /* restart after signal. */ 144 case PTRACE_CONT: { /* restart after signal. */
145 ret = -EIO; 145 ret = -EIO;
146 if ((unsigned long) data > _NSIG) 146 if (!valid_signal(data))
147 break; 147 break;
148 148
149 child->ptrace &= ~PT_DTRACE; 149 child->ptrace &= ~PT_DTRACE;
@@ -179,7 +179,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
179 179
180 case PTRACE_SINGLESTEP: { /* set the trap flag. */ 180 case PTRACE_SINGLESTEP: { /* set the trap flag. */
181 ret = -EIO; 181 ret = -EIO;
182 if ((unsigned long) data > _NSIG) 182 if (!valid_signal(data))
183 break; 183 break;
184 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 184 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
185 child->ptrace |= PT_DTRACE; 185 child->ptrace |= PT_DTRACE;