From: tip-bot for Alexander Levin <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, alexander.levin@verizon.com, hpa@zytor.com,
tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: [tip:smp/hotplug] perf/core: Don't release cred_guard_mutex if not taken
Date: Sat, 3 Jun 2017 00:34:13 -0700 [thread overview]
Message-ID: <tip-e5aeee51f6b4fb22e851105ee6d8ad211c40a214@git.kernel.org> (raw)
In-Reply-To: <20170603033903.12056-1-alexander.levin@verizon.com>
Commit-ID: e5aeee51f6b4fb22e851105ee6d8ad211c40a214
Gitweb: http://git.kernel.org/tip/e5aeee51f6b4fb22e851105ee6d8ad211c40a214
Author: Alexander Levin <alexander.levin@verizon.com>
AuthorDate: Sat, 3 Jun 2017 03:39:13 +0000
Committer: Thomas Gleixner <tglx@linutronix.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@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 | 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.
next prev parent reply other threads:[~2017-06-03 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-03 3:39 [PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken Levin, Alexander (Sasha Levin)
2017-06-03 7:34 ` tip-bot for Alexander Levin [this message]
2017-06-06 9:08 ` bigeasy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e5aeee51f6b4fb22e851105ee6d8ad211c40a214@git.kernel.org \
--to=tipbot@zytor.com \
--cc=alexander.levin@verizon.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox