]> Git Repo - linux.git/commitdiff
sched/cpufreq/schedutil: Fix error path mutex unlock
authorJules Maselbas <[email protected]>
Thu, 29 Mar 2018 14:43:01 +0000 (15:43 +0100)
committerIngo Molnar <[email protected]>
Sat, 31 Mar 2018 18:42:38 +0000 (20:42 +0200)
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 <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Chris Redpath <[email protected]>
Cc: Dietmar Eggermann <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Patrick Bellasi <[email protected]>
Cc: Stephen Kyle <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/cpufreq_schedutil.c

index 7936f548e071e201a2125981dedce3e162711a24..617c6741c5254a45012fe426aaf17eafc942d7bc 100644 (file)
@@ -625,10 +625,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:
This page took 0.058758 seconds and 4 git commands to generate.