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: <173693263859.31546.8029050012535413270.tip-bot2@tip-bot2>
Date: Wed, 15 Jan 2025 09:17:18 -0000
From: "tip-bot2 for David Rientjes" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: David Rientjes <rientjes@...gle.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Madadi Vineeth Reddy <vineethr@...ux.ibm.com>, Josh Don <joshdon@...gle.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/debug: Change need_resched warnings to pr_err

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     8061b9f5e111a3012f8b691e5b75dd81eafbb793
Gitweb:        https://git.kernel.org/tip/8061b9f5e111a3012f8b691e5b75dd81eafbb793
Author:        David Rientjes <rientjes@...gle.com>
AuthorDate:    Thu, 09 Jan 2025 16:24:33 -08:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 13 Jan 2025 14:10:23 +01:00

sched/debug: Change need_resched warnings to pr_err

need_resched warnings, if enabled, are treated as WARNINGs.  If
kernel.panic_on_warn is enabled, then this causes a kernel panic.

It's highly unlikely that a panic is desired for these warnings, only a
stack trace is normally required to debug and resolve.

Thus, switch need_resched warnings to simply be a printk with an
associated stack trace so they are no longer in scope for panic_on_warn.

Signed-off-by: David Rientjes <rientjes@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Acked-by: Josh Don <joshdon@...gle.com>
Link: https://lkml.kernel.org/r/e8d52023-5291-26bd-5299-8bb9eb604929@google.com
---
 kernel/sched/debug.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 5e8e84a..fd7e852 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -1292,8 +1292,10 @@ void resched_latency_warn(int cpu, u64 latency)
 {
 	static DEFINE_RATELIMIT_STATE(latency_check_ratelimit, 60 * 60 * HZ, 1);
 
-	WARN(__ratelimit(&latency_check_ratelimit),
-	     "sched: CPU %d need_resched set for > %llu ns (%d ticks) "
-	     "without schedule\n",
-	     cpu, latency, cpu_rq(cpu)->ticks_without_resched);
+	if (likely(!__ratelimit(&latency_check_ratelimit)))
+		return;
+
+	pr_err("sched: CPU %d need_resched set for > %llu ns (%d ticks) without schedule\n",
+	       cpu, latency, cpu_rq(cpu)->ticks_without_resched);
+	dump_stack();
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ