lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1b5d43cfb69759d8ef8d30469cea31d0c037aed5@git.kernel.org>
Date:   Sat, 31 Mar 2018 11:52:20 -0700
From:   tip-bot for Jules Maselbas <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, dietmar.eggemann@....com,
        linux-kernel@...r.kernel.org, stephen.kyle@....com,
        jules.maselbas@....com, hpa@...or.com, patrick.bellasi@....com,
        torvalds@...ux-foundation.org, chris.redpath@....com,
        mingo@...nel.org, efault@....de, tglx@...utronix.de
Subject: [tip:sched/urgent] sched/cpufreq/schedutil: Fix error path mutex
 unlock

Commit-ID:  1b5d43cfb69759d8ef8d30469cea31d0c037aed5
Gitweb:     https://git.kernel.org/tip/1b5d43cfb69759d8ef8d30469cea31d0c037aed5
Author:     Jules Maselbas <jules.maselbas@....com>
AuthorDate: Thu, 29 Mar 2018 15:43:01 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 31 Mar 2018 20:42:38 +0200

sched/cpufreq/schedutil: Fix error path mutex unlock

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>
---
 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 @@ 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ