[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e5aeee51f6b4fb22e851105ee6d8ad211c40a214@git.kernel.org>
Date: Sat, 3 Jun 2017 00:34:13 -0700
From: tip-bot for Alexander Levin <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, alexander.levin@...izon.com, hpa@...or.com,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:smp/hotplug] perf/core: Don't release cred_guard_mutex if not
taken
Commit-ID: e5aeee51f6b4fb22e851105ee6d8ad211c40a214
Gitweb: http://git.kernel.org/tip/e5aeee51f6b4fb22e851105ee6d8ad211c40a214
Author: Alexander Levin <alexander.levin@...izon.com>
AuthorDate: Sat, 3 Jun 2017 03:39:13 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 3 Jun 2017 09:28:45 +0200
perf/core: Don't release cred_guard_mutex if not taken
If we failed to acquire task's cred_guard_mutex we shouldn't proceed
to release it in the error path.
Fixes: a63fbed776c ("perf/tracing/cpuhotplug: Fix locking order")
Signed-off-by: Alexander Levin <alexander.levin@...izon.com>
Cc: peterz@...radead.org
Cc: rostedt@...dmis.org
Cc: mathieu.desnoyers@...icios.com
Cc: mhiramat@...nel.org
Cc: paulmck@...ux.vnet.ibm.com
Cc: bigeasy@...utronix.de
Link: http://lkml.kernel.org/r/20170603033903.12056-1-alexander.levin@verizon.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index b97cda4..1f1b8cd 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9878,7 +9878,7 @@ SYSCALL_DEFINE5(perf_event_open,
if (task) {
err = mutex_lock_interruptible(&task->signal->cred_guard_mutex);
if (err)
- goto err_cred;
+ goto err_task;
/*
* Reuse ptrace permission checks for now.
Powered by blists - more mailing lists