aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r--arch/parisc/kernel/ptrace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 2937a9236384..c07db9dff7cd 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -17,6 +17,7 @@
17#include <linux/personality.h> 17#include <linux/personality.h>
18#include <linux/security.h> 18#include <linux/security.h>
19#include <linux/compat.h> 19#include <linux/compat.h>
20#include <linux/signal.h>
20 21
21#include <asm/uaccess.h> 22#include <asm/uaccess.h>
22#include <asm/pgtable.h> 23#include <asm/pgtable.h>
@@ -285,7 +286,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
285 ret = -EIO; 286 ret = -EIO;
286 DBG("sys_ptrace(%s)\n", 287 DBG("sys_ptrace(%s)\n",
287 request == PTRACE_SYSCALL ? "SYSCALL" : "CONT"); 288 request == PTRACE_SYSCALL ? "SYSCALL" : "CONT");
288 if ((unsigned long) data > _NSIG) 289 if (!valid_signal(data))
289 goto out_tsk; 290 goto out_tsk;
290 child->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP); 291 child->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP);
291 if (request == PTRACE_SYSCALL) { 292 if (request == PTRACE_SYSCALL) {
@@ -311,7 +312,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
311 case PTRACE_SINGLEBLOCK: 312 case PTRACE_SINGLEBLOCK:
312 DBG("sys_ptrace(SINGLEBLOCK)\n"); 313 DBG("sys_ptrace(SINGLEBLOCK)\n");
313 ret = -EIO; 314 ret = -EIO;
314 if ((unsigned long) data > _NSIG) 315 if (!valid_signal(data))
315 goto out_tsk; 316 goto out_tsk;
316 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 317 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
317 child->ptrace &= ~PT_SINGLESTEP; 318 child->ptrace &= ~PT_SINGLESTEP;
@@ -328,7 +329,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
328 case PTRACE_SINGLESTEP: 329 case PTRACE_SINGLESTEP:
329 DBG("sys_ptrace(SINGLESTEP)\n"); 330 DBG("sys_ptrace(SINGLESTEP)\n");
330 ret = -EIO; 331 ret = -EIO;
331 if ((unsigned long) data > _NSIG) 332 if (!valid_signal(data))
332 goto out_tsk; 333 goto out_tsk;
333 334
334 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 335 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);