* [PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken
@ 2017-06-03 3:39 Levin, Alexander (Sasha Levin)
2017-06-03 7:34 ` [tip:smp/hotplug] perf/core: Don't " tip-bot for Alexander Levin
2017-06-06 9:08 ` [PATCH] perf/tracing/cpuhotplug: don't " bigeasy
0 siblings, 2 replies; 3+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-06-03 3:39 UTC (permalink / raw)
To: peterz@infradead.org, tglx@linutronix.de
Cc: mingo@kernel.org, paulmck@linux.vnet.ibm.com,
bigeasy@linutronix.de, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, mhiramat@kernel.org,
linux-kernel@vger.kernel.org, Levin, Alexander (Sasha Levin)
From: Alexander Levin <alexander.levin@verizon.com>
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>
---
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 8d6acaeeea17..8e8323c6036b 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.
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [tip:smp/hotplug] perf/core: Don't release cred_guard_mutex if not taken
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
2017-06-06 9:08 ` [PATCH] perf/tracing/cpuhotplug: don't " bigeasy
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Alexander Levin @ 2017-06-03 7:34 UTC (permalink / raw)
To: linux-tip-commits; +Cc: mingo, alexander.levin, hpa, tglx, linux-kernel
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.
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken
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:smp/hotplug] perf/core: Don't " tip-bot for Alexander Levin
@ 2017-06-06 9:08 ` bigeasy
1 sibling, 0 replies; 3+ messages in thread
From: bigeasy @ 2017-06-06 9:08 UTC (permalink / raw)
To: Levin, Alexander (Sasha Levin)
Cc: peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org,
paulmck@linux.vnet.ibm.com, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, mhiramat@kernel.org,
linux-kernel@vger.kernel.org
On 2017-06-03 03:39:13 [+0000], Levin, Alexander (Sasha Levin) wrote:
> From: Alexander Levin <alexander.levin@verizon.com>
>
> 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>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-06 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:smp/hotplug] perf/core: Don't " tip-bot for Alexander Levin
2017-06-06 9:08 ` [PATCH] perf/tracing/cpuhotplug: don't " bigeasy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox