kernel/softirq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The following commit has been merged into the irq/core branch of tip:
Commit-ID: a0e1fdb96578ea562a03c487f70673d228824d0a
Gitweb: https://git.kernel.org/tip/a0e1fdb96578ea562a03c487f70673d228824d0a
Author: Enlin Mu <enlin.mu@linux.dev>
AuthorDate: Tue, 25 Aug 2026 09:15:09 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sat, 05 Sep 2026 20:52:12 +02:00
softirq: Remove redundant h->action from preempt_count mismatch error
When a preempt_count mismatch is detected in handle_softirqs(), the
error message currently prints the softirq action handler (h->action).
However, as Thomas Gleixner pointed out, the action handler for a given
softirq vector is always a known, fixed function (e.g., run_timer_softirq
for TIMER_SOFTIRQ). Printing it provides zero diagnostic value. The real
issue typically lies in the functions invoked *within* that handler, not
the handler entry point itself.
Therefore, as suggested by Sebastian Andrzej Siewior, remove h->action
from the print statement entirely to clean up the error message.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Bradley Morgan <include@grrlz.net>
Link: https://patch.msgid.link/20260825011509.8505-1-enlin.mu@linux.dev
---
kernel/softirq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 7980a4a..800d81c 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -645,8 +645,8 @@ restart:
h->action();
trace_softirq_exit(vec_nr);
if (unlikely(prev_count != preempt_count())) {
- pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
- vec_nr, softirq_to_name[vec_nr], h->action,
+ pr_err("huh, entered softirq %u %s with preempt_count %08x, exited with %08x?\n",
+ vec_nr, softirq_to_name[vec_nr],
prev_count, preempt_count());
preempt_count_set(prev_count);
}
On 5 September 2026 20:00:00 BST, tip-bot2 for Enlin Mu
<tip-bot2@linutronix.de> wrote:
>The following commit has been merged into the irq/core branch of tip:
>
>Commit-ID: a0e1fdb96578ea562a03c487f70673d228824d0a
>Gitweb: https://git.kernel.org/tip/a0e1fdb96578ea562a03c487f70673d228824d0a
>Author: Enlin Mu <enlin.mu@linux.dev>
>AuthorDate: Tue, 25 Aug 2026 09:15:09 +08:00
>Committer: Thomas Gleixner <tglx@kernel.org>
>CommitterDate: Sat, 05 Sep 2026 20:52:12 +02:00
>
>softirq: Remove redundant h->action from preempt_count mismatch error
>
>When a preempt_count mismatch is detected in handle_softirqs(), the
>error message currently prints the softirq action handler (h->action).
>
>However, as Thomas Gleixner pointed out, the action handler for a given
>softirq vector is always a known, fixed function (e.g., run_timer_softirq
>for TIMER_SOFTIRQ). Printing it provides zero diagnostic value. The real
>issue typically lies in the functions invoked *within* that handler, not
>the handler entry point itself.
>
>Therefore, as suggested by Sebastian Andrzej Siewior, remove h->action
>from the print statement entirely to clean up the error message.
>
>Suggested-by: Thomas Gleixner <tglx@linutronix.de>
>Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
>Signed-off-by: Thomas Gleixner <tglx@kernel.org>
>Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>Reviewed-by: Bradley Morgan <include@grrlz.net>
Sorry:
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Oof. :(
>Link: https://patch.msgid.link/20260825011509.8505-1-enlin.mu@linux.dev
>---
> kernel/softirq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/softirq.c b/kernel/softirq.c
>index 7980a4a..800d81c 100644
>--- a/kernel/softirq.c
>+++ b/kernel/softirq.c
>@@ -645,8 +645,8 @@ restart:
> h->action();
> trace_softirq_exit(vec_nr);
> if (unlikely(prev_count != preempt_count())) {
>- pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
>- vec_nr, softirq_to_name[vec_nr], h->action,
>+ pr_err("huh, entered softirq %u %s with preempt_count %08x, exited with %08x?\n",
>+ vec_nr, softirq_to_name[vec_nr],
> prev_count, preempt_count());
> preempt_count_set(prev_count);
> }
>
>
--- Thanks!
https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@grrlz.net/
© 2016 - 2026 Red Hat, Inc.