diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-03 03:14:09 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-03 03:14:09 -0400 |
commit | 27b030d58c8e72fc7a95187a791bd9406e350f02 (patch) | |
tree | ab3bab7f39a5ce5bab65578a7e08fa4dfdeb198c /arch/ppc64/kernel/ptrace.c | |
parent | 79d20b14a0d651f15b0ef9a22b6cf12d284a6d38 (diff) | |
parent | 6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/ppc64/kernel/ptrace.c')
-rw-r--r-- | arch/ppc64/kernel/ptrace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/ptrace.c b/arch/ppc64/kernel/ptrace.c index 3c76333ec3a9..9f8c6087ae56 100644 --- a/arch/ppc64/kernel/ptrace.c +++ b/arch/ppc64/kernel/ptrace.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/security.h> | 28 | #include <linux/security.h> |
29 | #include <linux/audit.h> | 29 | #include <linux/audit.h> |
30 | #include <linux/seccomp.h> | 30 | #include <linux/seccomp.h> |
31 | #include <linux/signal.h> | ||
31 | 32 | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/page.h> | 34 | #include <asm/page.h> |
@@ -162,7 +163,7 @@ int sys_ptrace(long request, long pid, long addr, long data) | |||
162 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 163 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
163 | case PTRACE_CONT: { /* restart after signal. */ | 164 | case PTRACE_CONT: { /* restart after signal. */ |
164 | ret = -EIO; | 165 | ret = -EIO; |
165 | if ((unsigned long) data > _NSIG) | 166 | if (!valid_signal(data)) |
166 | break; | 167 | break; |
167 | if (request == PTRACE_SYSCALL) | 168 | if (request == PTRACE_SYSCALL) |
168 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 169 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
@@ -194,7 +195,7 @@ int sys_ptrace(long request, long pid, long addr, long data) | |||
194 | 195 | ||
195 | case PTRACE_SINGLESTEP: { /* set the trap flag. */ | 196 | case PTRACE_SINGLESTEP: { /* set the trap flag. */ |
196 | ret = -EIO; | 197 | ret = -EIO; |
197 | if ((unsigned long) data > _NSIG) | 198 | if (!valid_signal(data)) |
198 | break; | 199 | break; |
199 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 200 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
200 | set_single_step(child); | 201 | set_single_step(child); |