aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-04-26 19:41:34 -0400
committerJames Morris <jmorris@namei.org>2009-04-27 06:30:51 -0400
commitcad81bc2529ab8c62b6fdc83a1c0c7f4a87209eb (patch)
tree8d056ddb9db3db5eeba6a6fb629efe2c05b67ea0 /kernel
parentce8a7424d23a36f043d0de8484f888971c831119 (diff)
ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex
ptrace_attach() needs task->cred_exec_mutex, not current->cred_exec_mutex. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index dfcd83ceee3b..0692ab5a0d67 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -188,7 +188,7 @@ int ptrace_attach(struct task_struct *task)
188 /* Protect exec's credential calculations against our interference; 188 /* Protect exec's credential calculations against our interference;
189 * SUID, SGID and LSM creds get determined differently under ptrace. 189 * SUID, SGID and LSM creds get determined differently under ptrace.
190 */ 190 */
191 retval = mutex_lock_interruptible(&current->cred_exec_mutex); 191 retval = mutex_lock_interruptible(&task->cred_exec_mutex);
192 if (retval < 0) 192 if (retval < 0)
193 goto out; 193 goto out;
194 194
@@ -232,7 +232,7 @@ repeat:
232bad: 232bad:
233 write_unlock_irqrestore(&tasklist_lock, flags); 233 write_unlock_irqrestore(&tasklist_lock, flags);
234 task_unlock(task); 234 task_unlock(task);
235 mutex_unlock(&current->cred_exec_mutex); 235 mutex_unlock(&task->cred_exec_mutex);
236out: 236out:
237 return retval; 237 return retval;
238} 238}