[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175137561585.406.15071962076426718884.tip-bot2@tip-bot2>
Date: Tue, 01 Jul 2025 13:13:35 -0000
From:
tip-bot2 for Thomas Weißschuh <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: thomas.weissschuh@...utronix.de,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Shrikanth Hegde <sshegde@...ux.ibm.com>, stable@...r.kernel.org,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
[tip: sched/urgent] sched: Fix preemption string of preempt_dynamic_none
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 3ebb1b6522392f64902b4e96954e35927354aa27
Gitweb: https://git.kernel.org/tip/3ebb1b6522392f64902b4e96954e35927354aa27
Author: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
AuthorDate: Thu, 26 Jun 2025 11:23:44 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Tue, 01 Jul 2025 15:02:02 +02:00
sched: Fix preemption string of preempt_dynamic_none
Zero is a valid value for "preempt_dynamic_mode", namely
"preempt_dynamic_none".
Fix the off-by-one in preempt_model_str(), so that "preempty_dynamic_none"
is correctly formatted as PREEMPT(none) instead of PREEMPT(undef).
Fixes: 8bdc5daaa01e ("sched: Add a generic function to return the preemption string")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Tested-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20250626-preempt-str-none-v2-1-526213b70a89@linutronix.de
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8988d38..cd80b66 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7663,7 +7663,7 @@ const char *preempt_model_str(void)
if (IS_ENABLED(CONFIG_PREEMPT_DYNAMIC)) {
seq_buf_printf(&s, "(%s)%s",
- preempt_dynamic_mode > 0 ?
+ preempt_dynamic_mode >= 0 ?
preempt_modes[preempt_dynamic_mode] : "undef",
brace ? "}" : "");
return seq_buf_str(&s);
Powered by blists - more mailing lists