Commit 0ee23b50 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds

[PATCH] xtensa: use valid_signal()

xtensa should use valid_signal() instead of testing _NSIG directly like
everyone else.
Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 306e440d
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/signal.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -239,7 +240,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -239,7 +240,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PTRACE_CONT: /* restart after signal. */ case PTRACE_CONT: /* restart after signal. */
{ {
ret = -EIO; ret = -EIO;
if ((unsigned long) data > _NSIG) if (!valid_signal(data))
break; break;
if (request == PTRACE_SYSCALL) if (request == PTRACE_SYSCALL)
set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
...@@ -269,7 +270,7 @@ int sys_ptrace(long request, long pid, long addr, long data) ...@@ -269,7 +270,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
case PTRACE_SINGLESTEP: case PTRACE_SINGLESTEP:
ret = -EIO; ret = -EIO;
if ((unsigned long) data > _NSIG) if (!valid_signal(data))
break; break;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
child->ptrace |= PT_SINGLESTEP; child->ptrace |= PT_SINGLESTEP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment