perf/core: Don't release cred_guard_mutex if not taken
authorAlexander Levin <alexander.levin@verizon.com>
Sat, 3 Jun 2017 03:39:13 +0000 (03:39 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 3 Jun 2017 07:28:45 +0000 (09:28 +0200)
commite5aeee51f6b4fb22e851105ee6d8ad211c40a214
treece87eee9d18994da498c862b850b07a14a65d6cd
parent49dfe2a6779717d9c18395684ee31bdc98b22e53
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>
kernel/events/core.c