aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 647233c02fc8..9f0d73e3f5f7 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -32,6 +32,7 @@
32#include <linux/user.h> 32#include <linux/user.h>
33#include <linux/security.h> 33#include <linux/security.h>
34#include <linux/audit.h> 34#include <linux/audit.h>
35#include <linux/signal.h>
35 36
36#include <asm/segment.h> 37#include <asm/segment.h>
37#include <asm/page.h> 38#include <asm/page.h>
@@ -609,7 +610,7 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
609 /* continue and stop at next (return from) syscall */ 610 /* continue and stop at next (return from) syscall */
610 case PTRACE_CONT: 611 case PTRACE_CONT:
611 /* restart after signal. */ 612 /* restart after signal. */
612 if ((unsigned long) data >= _NSIG) 613 if (!valid_signal(data))
613 return -EIO; 614 return -EIO;
614 if (request == PTRACE_SYSCALL) 615 if (request == PTRACE_SYSCALL)
615 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 616 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
@@ -637,7 +638,7 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
637 638
638 case PTRACE_SINGLESTEP: 639 case PTRACE_SINGLESTEP:
639 /* set the trap flag. */ 640 /* set the trap flag. */
640 if ((unsigned long) data >= _NSIG) 641 if (!valid_signal(data))
641 return -EIO; 642 return -EIO;
642 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 643 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
643 child->exit_code = data; 644 child->exit_code = data;