* [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
* Re: [PATCH] sparc/pci_msi: Clear the MSI descriptor irq on teardown
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
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-27 11:10 UTC (permalink / raw)
To: Imre Kaloz; +Cc: linux-pci
> 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>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260927105515.8701-1-kaloz@kernel.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sparc/pci_msi: Clear the MSI descriptor irq on teardown
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
1 sibling, 0 replies; 3+ messages in thread
From: Stian Halseth @ 2026-10-03 19:22 UTC (permalink / raw)
To: Imre Kaloz, Andreas Larsson
Cc: sparclinux, David S. Miller, Thomas Gleixner, linux-pci, stable
On Sun, Sep 27, 2026 at 12:55:15PM +0200, Imre Kaloz wrote:
> 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.
Tested on a SPARC T7-1 (M7) with 7.3-rc5 and ixgbe. Without the patch
the first MSI-X teardown warns at kernel/irq/msi.c:214. With it, 30
teardowns through ethtool -L and 3 unbind/bind cycles give no warning,
and the device keeps the expected number of MSI-X vectors.
Tested-by: Stian Halseth <stian@itx.no>
^ permalink raw reply [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