diff options
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 2442d140bd9a..f6d8b8cb5e34 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -175,10 +175,11 @@ int ptrace_attach(struct task_struct *task) | |||
175 | if (same_thread_group(task, current)) | 175 | if (same_thread_group(task, current)) |
176 | goto out; | 176 | goto out; |
177 | 177 | ||
178 | /* Protect exec's credential calculations against our interference; | 178 | /* Protect the target's credential calculations against our |
179 | * SUID, SGID and LSM creds get determined differently under ptrace. | 179 | * interference; SUID, SGID and LSM creds get determined differently |
180 | * under ptrace. | ||
180 | */ | 181 | */ |
181 | retval = mutex_lock_interruptible(&task->cred_exec_mutex); | 182 | retval = mutex_lock_interruptible(&task->cred_guard_mutex); |
182 | if (retval < 0) | 183 | if (retval < 0) |
183 | goto out; | 184 | goto out; |
184 | 185 | ||
@@ -222,7 +223,7 @@ repeat: | |||
222 | bad: | 223 | bad: |
223 | write_unlock_irqrestore(&tasklist_lock, flags); | 224 | write_unlock_irqrestore(&tasklist_lock, flags); |
224 | task_unlock(task); | 225 | task_unlock(task); |
225 | mutex_unlock(&task->cred_exec_mutex); | 226 | mutex_unlock(&task->cred_guard_mutex); |
226 | out: | 227 | out: |
227 | return retval; | 228 | return retval; |
228 | } | 229 | } |