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]
Date:   Wed, 10 Oct 2018 02:51:52 -0700
From:   tip-bot for Peng Hao <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
        peng.hao2@....com.cn, hpa@...or.com
Subject: [tip:timers/core] tick/sched : Remove redundant cpu_online() check

Commit-ID:  d59e0ba19481c0046d2ea2bd0e5344eeaf45aace
Gitweb:     https://git.kernel.org/tip/d59e0ba19481c0046d2ea2bd0e5344eeaf45aace
Author:     Peng Hao <peng.hao2@....com.cn>
AuthorDate: Tue, 9 Oct 2018 11:43:35 -0400
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 10 Oct 2018 11:47:20 +0200

tick/sched : Remove redundant cpu_online() check

can_stop_idle_tick() checks cpu_online() twice. The first check leaves the
function when the CPU is not online, so the second check it
redundant. Remove it.

Signed-off-by: Peng Hao <peng.hao2@....com.cn>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: fweisbec@...il.com
Link: https://lkml.kernel.org/r/1539099815-2943-1-git-send-email-penghao122@sina.com.cn
---
 kernel/time/tick-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 5b33e2f5c0ed..69e673b88474 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -885,7 +885,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
 	if (need_resched())
 		return false;
 
-	if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
+	if (unlikely(local_softirq_pending())) {
 		static int ratelimit;
 
 		if (ratelimit < 10 &&

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ