public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: Keep handle_nested_irq() from touching desc->threads_active
@ 2024-06-09 18:30 Peng Liu
  2024-06-10 18:23 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Liu @ 2024-06-09 18:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: tglx, gregkh, maz, vincent.whitchurch, iwtbavbm, 158710936

handle_nested_irq() is supposed to be running inside the parent thread
handler context. It per se has no dedicated kernel thread, thus shouldn't
touch desc->threads_active. The parent kernel thread has already taken
care of this.

Fixes: e2c12739ccf7 ("genirq: Prevent nested thread vs synchronize_hardirq() deadlock")
Cc: stable@vger.kernel.org
Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
---

Despite of its correctness, I'm afraid the testing on my only PC can't
cover the affected code path. So the patch may be totally -UNTESTED-.

 kernel/irq/chip.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc94e0bf2c94..85d4f29134e9 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -478,7 +478,6 @@ void handle_nested_irq(unsigned int irq)
 	}
 
 	kstat_incr_irqs_this_cpu(desc);
-	atomic_inc(&desc->threads_active);
 	raw_spin_unlock_irq(&desc->lock);
 
 	action_ret = IRQ_NONE;
@@ -487,8 +486,6 @@ void handle_nested_irq(unsigned int irq)
 
 	if (!irq_settings_no_debug(desc))
 		note_interrupt(desc, action_ret);
-
-	wake_threads_waitq(desc);
 }
 EXPORT_SYMBOL_GPL(handle_nested_irq);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-11 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-09 18:30 [PATCH] genirq: Keep handle_nested_irq() from touching desc->threads_active Peng Liu
2024-06-10 18:23 ` Thomas Gleixner
2024-06-11 13:19   ` Peng Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox