Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] sparc/pci_msi: Clear the MSI descriptor irq on teardown
@ 2026-09-27 10:55 Imre Kaloz
  2026-09-27 11:10 ` sashiko-bot
  2026-10-03 19:22 ` Stian Halseth
  0 siblings, 2 replies; 3+ messages in thread
From: Imre Kaloz @ 2026-09-27 10:55 UTC (permalink / raw)
  To: Andreas Larsson, sparclinux
  Cc: David S. Miller, Thomas Gleixner, linux-pci, stable

Since commit 2f2940d16823 ("genirq/msi: Remove filter from
msi_free_descs_free_range()") the MSI core expects msi_desc::irq to be
cleared by the architecture teardown before the descriptor is freed.
sparc64_teardown_msi_irq() never clears it, so disabling MSI or MSI-X
warns in msi_domain_free_descs() and leaks the descriptor.

Clear it once the MSI has been torn down.

Fixes: 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()")
Cc: stable@vger.kernel.org
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
 arch/sparc/kernel/pci_msi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index acb2f83a1d5c..bb1610497b50 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -211,6 +211,7 @@ static void sparc64_teardown_msi_irq(unsigned int irq,
 
 	free_msi(pbm, msi_num);
 
+	irq_get_msi_desc(irq)->irq = 0;
 	irq_set_chip(irq, NULL);
 	irq_free(irq);
 }

base-commit: fe2ec83746e501645709761605c2464a44fd2929
-- 
2.47.3


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

end of thread, other threads:[~2026-10-03 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27 10:55 [PATCH] sparc/pci_msi: Clear the MSI descriptor irq on teardown Imre Kaloz
2026-09-27 11:10 ` sashiko-bot
2026-10-03 19:22 ` Stian Halseth

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