diff options
author | akpm@osdl.org <akpm@osdl.org> | 2005-05-01 11:58:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:58:47 -0400 |
commit | d59dd4620fb8d6422555a9e2b82a707718e68327 (patch) | |
tree | 78205657d24efcaa3f8314064951ac3814ed95a7 /kernel/ptrace.c | |
parent | 0d8d4d42f2d00eb65262b49f4edd4cf7ef4eb6fc (diff) |
[PATCH] use smp_mb/wmb/rmb where possible
Replace a number of memory barriers with smp_ variants. This means we won't
take the unnecessary hit on UP machines.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 88b306c4e841..f5cc1cec0fb4 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -135,7 +135,7 @@ int ptrace_attach(struct task_struct *task) | |||
135 | (current->gid != task->sgid) || | 135 | (current->gid != task->sgid) || |
136 | (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) | 136 | (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) |
137 | goto bad; | 137 | goto bad; |
138 | rmb(); | 138 | smp_rmb(); |
139 | if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) | 139 | if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) |
140 | goto bad; | 140 | goto bad; |
141 | /* the same process cannot be attached many times */ | 141 | /* the same process cannot be attached many times */ |