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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Feb 2018 05:09:49 -0800
From:   tip-bot for Baolin Wang <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org, hpa@...or.com,
        tglx@...utronix.de, baolin.wang@...aro.org
Subject: [tip:timers/core] clocksource: Don't walk the clocksource list for
 empty override

Commit-ID:  7f852afe448c95691ead6b57bae5f37562d060b5
Gitweb:     https://git.kernel.org/tip/7f852afe448c95691ead6b57bae5f37562d060b5
Author:     Baolin Wang <baolin.wang@...aro.org>
AuthorDate: Wed, 17 Jan 2018 14:01:28 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 28 Feb 2018 14:04:52 +0100

clocksource: Don't walk the clocksource list for empty override

If the override clocksource name is empty there is no point in walking the
clocksource list for a match.

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: arnd@...db.de
Cc: sboyd@...eaurora.org
Cc: broonie@...nel.org
Cc: john.stultz@...aro.org
Link: https://lkml.kernel.org/r/069ce2a605546bcad6552968cff755f0a03f9f10.1516167691.git.baolin.wang@linaro.org

---
 kernel/time/clocksource.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 65f9e3f24dde..c5fdcb13200f 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -594,6 +594,9 @@ static void __clocksource_select(bool skipcur)
 	if (!best)
 		return;
 
+	if (!strlen(override_name))
+		goto found;
+
 	/* Check for the override clocksource. */
 	list_for_each_entry(cs, &clocksource_list, list) {
 		if (skipcur && cs == curr_clocksource)
@@ -625,6 +628,7 @@ static void __clocksource_select(bool skipcur)
 		break;
 	}
 
+found:
 	if (curr_clocksource != best && !timekeeping_notify(best)) {
 		pr_info("Switched to clocksource %s\n", best->name);
 		curr_clocksource = best;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ