From 70187595b848971f6efc6502eb5220dc31c09c7b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 1 Oct 2020 18:32:40 +0200 Subject: [PATCH] Revert "kernel/kcmp.c: Use new infrastructure to fix deadlocks in execve" This reverts commit 0cd97836869e9792cd66a2223b978f0148b46a12 which is commit 454e3126cb842388e22df6b3ac3da44062c00765 upstream. It breaks the API and we don't need it right now in the 5.4 tree. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: I2a8282c4bc97e97debad023bf098dd97fd02b072 --- kernel/kcmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/kcmp.c b/kernel/kcmp.c index b3ff9288c6cc..a0e3d7a0e8b8 100644 --- a/kernel/kcmp.c +++ b/kernel/kcmp.c @@ -173,8 +173,8 @@ SYSCALL_DEFINE5(kcmp, pid_t, pid1, pid_t, pid2, int, type, /* * One should have enough rights to inspect task details. */ - ret = kcmp_lock(&task1->signal->exec_update_mutex, - &task2->signal->exec_update_mutex); + ret = kcmp_lock(&task1->signal->cred_guard_mutex, + &task2->signal->cred_guard_mutex); if (ret) goto err; if (!ptrace_may_access(task1, PTRACE_MODE_READ_REALCREDS) || @@ -229,8 +229,8 @@ SYSCALL_DEFINE5(kcmp, pid_t, pid1, pid_t, pid2, int, type, } err_unlock: - kcmp_unlock(&task1->signal->exec_update_mutex, - &task2->signal->exec_update_mutex); + kcmp_unlock(&task1->signal->cred_guard_mutex, + &task2->signal->cred_guard_mutex); err: put_task_struct(task1); put_task_struct(task2);