aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-05-17 18:53:14 -0400
committerTony Luck <tony.luck@intel.com>2005-05-17 18:53:14 -0400
commit325a479c4c110db278ef3361460a48c4093252cc (patch)
treebcfbf4d0647d9442045639a5c19da59d55190e81 /kernel/ptrace.c
parentebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff)
parent7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff)
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 88b306c4e841..8dcb8f6288bc 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -16,6 +16,7 @@
16#include <linux/smp_lock.h> 16#include <linux/smp_lock.h>
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18#include <linux/security.h> 18#include <linux/security.h>
19#include <linux/signal.h>
19 20
20#include <asm/pgtable.h> 21#include <asm/pgtable.h>
21#include <asm/uaccess.h> 22#include <asm/uaccess.h>
@@ -135,7 +136,7 @@ int ptrace_attach(struct task_struct *task)
135 (current->gid != task->sgid) || 136 (current->gid != task->sgid) ||
136 (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) 137 (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE))
137 goto bad; 138 goto bad;
138 rmb(); 139 smp_rmb();
139 if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) 140 if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE))
140 goto bad; 141 goto bad;
141 /* the same process cannot be attached many times */ 142 /* the same process cannot be attached many times */
@@ -166,7 +167,7 @@ bad:
166 167
167int ptrace_detach(struct task_struct *child, unsigned int data) 168int ptrace_detach(struct task_struct *child, unsigned int data)
168{ 169{
169 if ((unsigned long) data > _NSIG) 170 if (!valid_signal(data))
170 return -EIO; 171 return -EIO;
171 172
172 /* Architecture-specific hardware disable .. */ 173 /* Architecture-specific hardware disable .. */