aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/ptrace.c')
-rw-r--r--arch/x86_64/kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index c7011675007d..c64b9c97c745 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -18,6 +18,7 @@
18#include <linux/security.h> 18#include <linux/security.h>
19#include <linux/audit.h> 19#include <linux/audit.h>
20#include <linux/seccomp.h> 20#include <linux/seccomp.h>
21#include <linux/signal.h>
21 22
22#include <asm/uaccess.h> 23#include <asm/uaccess.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
@@ -467,7 +468,7 @@ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, long data
467 case PTRACE_CONT: /* restart after signal. */ 468 case PTRACE_CONT: /* restart after signal. */
468 469
469 ret = -EIO; 470 ret = -EIO;
470 if ((unsigned long) data > _NSIG) 471 if (!valid_signal(data))
471 break; 472 break;
472 if (request == PTRACE_SYSCALL) 473 if (request == PTRACE_SYSCALL)
473 set_tsk_thread_flag(child,TIF_SYSCALL_TRACE); 474 set_tsk_thread_flag(child,TIF_SYSCALL_TRACE);
@@ -529,7 +530,7 @@ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, long data
529 530
530 case PTRACE_SINGLESTEP: /* set the trap flag. */ 531 case PTRACE_SINGLESTEP: /* set the trap flag. */
531 ret = -EIO; 532 ret = -EIO;
532 if ((unsigned long) data > _NSIG) 533 if (!valid_signal(data))
533 break; 534 break;
534 clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE); 535 clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE);
535 set_singlestep(child); 536 set_singlestep(child);