Re: [PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken

2017-06-06 Thread bige...@linutronix.de
On 2017-06-03 03:39:13 [+], Levin, Alexander (Sasha Levin) wrote:
> From: Alexander Levin 
> 
> 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 

Acked-by: Sebastian Andrzej Siewior 

Sebastian


Re: [PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken

2017-06-06 Thread bige...@linutronix.de
On 2017-06-03 03:39:13 [+], Levin, Alexander (Sasha Levin) wrote:
> From: Alexander Levin 
> 
> 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 

Acked-by: Sebastian Andrzej Siewior 

Sebastian


[PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken

2017-06-02 Thread Levin, Alexander (Sasha Levin)
From: Alexander Levin 

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 
---
 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(>signal->cred_guard_mutex);
if (err)
-   goto err_cred;
+   goto err_task;
 
/*
 * Reuse ptrace permission checks for now.
-- 
2.11.0


[PATCH] perf/tracing/cpuhotplug: don't release cred_guard_mutex if not taken

2017-06-02 Thread Levin, Alexander (Sasha Levin)
From: Alexander Levin 

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 
---
 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(>signal->cred_guard_mutex);
if (err)
-   goto err_cred;
+   goto err_task;
 
/*
 * Reuse ptrace permission checks for now.
-- 
2.11.0