diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-30 05:58:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-30 11:45:10 -0400 |
commit | 0ee23b50f1541aacc3b975edae170a1b995b84f5 (patch) | |
tree | 8dbb7f164e8c100aaeecfc63fc2abfa8f699141f /arch/xtensa | |
parent | 306e440daf5f40b195afd83d05dee89fa63189e7 (diff) |
[PATCH] xtensa: use valid_signal()
xtensa should use valid_signal() instead of testing _NSIG directly like
everyone else.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9ef07a4dd2a2..2659efdd4e99 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/smp_lock.h> |
24 | #include <linux/security.h> | 24 | #include <linux/security.h> |
25 | #include <linux/signal.h> | ||
25 | 26 | ||
26 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
@@ -239,7 +240,7 @@ int sys_ptrace(long request, long pid, long addr, long data) | |||
239 | case PTRACE_CONT: /* restart after signal. */ | 240 | case PTRACE_CONT: /* restart after signal. */ |
240 | { | 241 | { |
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); |
@@ -269,7 +270,7 @@ int sys_ptrace(long request, long pid, long addr, long data) | |||
269 | 270 | ||
270 | case PTRACE_SINGLESTEP: | 271 | case PTRACE_SINGLESTEP: |
271 | ret = -EIO; | 272 | ret = -EIO; |
272 | if ((unsigned long) data > _NSIG) | 273 | if (!valid_signal(data)) |
273 | break; | 274 | break; |
274 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 275 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
275 | child->ptrace |= PT_SINGLESTEP; | 276 | child->ptrace |= PT_SINGLESTEP; |