* [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error
@ 2026-08-25 1:15 Enlin Mu
2026-08-25 6:53 ` Sebastian Andrzej Siewior
2026-08-25 13:08 ` Bradley Morgan
0 siblings, 2 replies; 3+ messages in thread
From: Enlin Mu @ 2026-08-25 1:15 UTC (permalink / raw)
To: peterz, tglx, boqun, lyude, bigeasy, joelagnelf, linux-kernel,
enlin.mu, enlin.mu
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@unisoc.com>
Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
---
v1 -> v2:
- Instead of changing %p to %pS, remove h->action from the print
entirely as suggested by Sebastian and Thomas.
- Update commit message accordingly.
v1: https://lore.kernel.org/all/20260105094133.3542-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 7980a4a232f9..800d81c57302 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -645,8 +645,8 @@ static void handle_softirqs(bool ksirqd)
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);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error
2026-08-25 1:15 [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error Enlin Mu
@ 2026-08-25 6:53 ` Sebastian Andrzej Siewior
2026-08-25 13:08 ` Bradley Morgan
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-08-25 6:53 UTC (permalink / raw)
To: Enlin Mu; +Cc: peterz, tglx, boqun, lyude, joelagnelf, linux-kernel, enlin.mu
On 2026-08-25 09:15:09 [+0800], Enlin Mu wrote:
> 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@unisoc.com>
> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error
2026-08-25 1:15 [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error Enlin Mu
2026-08-25 6:53 ` Sebastian Andrzej Siewior
@ 2026-08-25 13:08 ` Bradley Morgan
1 sibling, 0 replies; 3+ messages in thread
From: Bradley Morgan @ 2026-08-25 13:08 UTC (permalink / raw)
To: enlin.mu
Cc: bigeasy, boqun, enlin.mu, joelagnelf, linux-kernel, lyude, peterz,
tglx
On 25 August 2026 02:15:09 BST, Enlin Mu <enlin.mu@linux.dev> wrote:
>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>
LGTM, thanks,
Reviewed-by: Bradley Morgan <include@grrlz.net>
>Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
>Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
>---
>v1 -> v2:
> - Instead of changing %p to %pS, remove h->action from the print
> entirely as suggested by Sebastian and Thomas.
> - Update commit message accordingly.
>
>v1: https://lore.kernel.org/all/20260105094133.3542-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 7980a4a232f9..800d81c57302 100644
>--- a/kernel/softirq.c
>+++ b/kernel/softirq.c
>@@ -645,8 +645,8 @@ static void handle_softirqs(bool ksirqd)
> 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!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-25 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 1:15 [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error Enlin Mu
2026-08-25 6:53 ` Sebastian Andrzej Siewior
2026-08-25 13:08 ` Bradley Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox