Messages in this thread Patch in this message | | | From | Jules Maselbas <> | Subject | [PATCH] cpufreq: schedutil: Prevent unnecessary mutex unlock | Date | Thu, 29 Mar 2018 15:43:01 +0100 |
| |
This patch prevents the mutex global_tunables_lock from being unlocked before being locked. This mutex is not locked if the function sugov_kthread_create fails.
Signed-off-by: Jules Maselbas <jules.maselbas@arm.com> --- kernel/sched/cpufreq_schedutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 7936f548e071..617c6741c525 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -625,10 +625,9 @@ static int sugov_init(struct cpufreq_policy *policy) 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: -- 2.16.2
| |