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>] [day] [month] [year] [list]
Message-Id: <20230803112629.1139-1-liming.wu@jaguarmicro.com>
Date:   Thu,  3 Aug 2023 19:26:28 +0800
From:   liming.wu@...uarmicro.com
To:     peterz@...radead.org
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org,
        juri.lelli@...hat.com, Liming Wu <liming.wu@...uarmicro.com>
Subject: [PATCH] sched: remove redundant check in __schedule_bug

From: Liming Wu <liming.wu@...uarmicro.com>

in_atomic_preempt_off is checked twice in schedule_debug, and
__schedule_bug only called in schedule_debug. remove the redundant
in_atomic_preempt_off check in __schedule_bug.

Signed-off-by: Liming Wu <liming.wu@...uarmicro.com>
---
 kernel/sched/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a68d1276bab0..ae44958b3851
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5884,8 +5884,7 @@ static noinline void __schedule_bug(struct task_struct *prev)
 	print_modules();
 	if (irqs_disabled())
 		print_irqtrace_events(prev);
-	if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)
-	    && in_atomic_preempt_off()) {
+	if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)) {
 		pr_err("Preemption disabled at:");
 		print_ip_sym(KERN_ERR, preempt_disable_ip);
 	}
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ