aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/ptrace.c5
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;