Messages in this thread Patch in this message | | | From | David Howells <> | Subject | [PATCH] CRED: ptrace_attach() should use the target process's mutex | Date | Wed, 01 Oct 2008 16:38:26 +0100 |
| |
ptrace_attach() should use the target process's mutex when attaching to it, not the current (tracer) process's mutex.
Signed-off-by: David Howells <dhowells@redhat.com> ---
kernel/ptrace.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 893a099..2ee343a 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -174,7 +174,7 @@ int ptrace_attach(struct task_struct *task) /* Protect exec's credential calculations against our interference; * SUID, SGID and LSM creds get determined differently under ptrace. */ - retval = mutex_lock_interruptible(¤t->cred_exec_mutex); + retval = mutex_lock_interruptible(&task->cred_exec_mutex); if (retval < 0) goto out; @@ -218,7 +218,7 @@ repeat: bad: write_unlock_irqrestore(&tasklist_lock, flags); task_unlock(task); - mutex_unlock(¤t->cred_exec_mutex); + mutex_unlock(&task->cred_exec_mutex); out: return retval; }
| |