diff options
author | Alexander Levin <alexander.levin@verizon.com> | 2017-06-03 05:39:13 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-03 09:28:45 +0200 |
commit | e5aeee51f6b4fb22e851105ee6d8ad211c40a214 (patch) | |
tree | ce87eee9d18994da498c862b850b07a14a65d6cd /kernel/events | |
parent | cpuhotplug: Link lock stacks for hotplug callbacks (diff) | |
download | linux-e5aeee51f6b4fb22e851105ee6d8ad211c40a214.tar.xz linux-e5aeee51f6b4fb22e851105ee6d8ad211c40a214.zip |
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@verizon.com>
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: mhiramat@kernel.org
Cc: paulmck@linux.vnet.ibm.com
Cc: bigeasy@linutronix.de
Link: http://lkml.kernel.org/r/20170603033903.12056-1-alexander.levin@verizon.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index b97cda4d1777..1f1b8cdaca2d 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. |