[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190326042651.965892960@linuxfoundation.org>
Date: Tue, 26 Mar 2019 15:30:15 +0900
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jules Maselbas <jules.maselbas@....com>,
Peter Zijlstra <peterz@...radead.org>,
Chris Redpath <chris.redpath@....com>,
Dietmar Eggermann <dietmar.eggemann@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mike Galbraith <efault@....de>,
Patrick Bellasi <patrick.bellasi@....com>,
Stephen Kyle <stephen.kyle@....com>,
Thomas Gleixner <tglx@...utronix.de>, nd@....com,
Ingo Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 4.14 38/41] sched/cpufreq/schedutil: Fix error path mutex unlock
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jules Maselbas <jules.maselbas@....com>
commit 1b5d43cfb69759d8ef8d30469cea31d0c037aed5 upstream.
This patch prevents the 'global_tunables_lock' mutex from being
unlocked before being locked. This mutex is not locked if the
sugov_kthread_create() function fails.
Signed-off-by: Jules Maselbas <jules.maselbas@....com>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Cc: Chris Redpath <chris.redpath@....com>
Cc: Dietmar Eggermann <dietmar.eggemann@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Patrick Bellasi <patrick.bellasi@....com>
Cc: Stephen Kyle <stephen.kyle@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org
Cc: nd@....com
Link: http://lkml.kernel.org/r/20180329144301.38419-1-jules.maselbas@arm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/sched/cpufreq_schedutil.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -605,10 +605,9 @@ fail:
stop_kthread:
sugov_kthread_stop(sg_policy);
-
-free_sg_policy:
mutex_unlock(&global_tunables_lock);
+free_sg_policy:
sugov_policy_free(sg_policy);
disable_fast_switch:
Powered by blists - more mailing lists