* [PATCH v2] vdpa: solidrun: Free IRQs after request failure
@ 2026-08-05 1:51 Xiong Weimin
2026-08-05 5:40 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Xiong Weimin @ 2026-08-05 1:51 UTC (permalink / raw)
To: Alvaro Karsz
Cc: Michael S. Tsirkin, Jason Wang, Xuan Zhuo, Eugenio Pérez,
virtualization, linux-kernel, Markus Elfring, stable
Unwind IRQs already requested by snet_request_irqs() before returning a
VQ IRQ request error so a later DRIVER_OK retry starts from a clean
state. The IRQs are requested and freed while the PCI device remains
bound, so the driver cannot wait for devres cleanup at detach time.
Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
---
v2:
- Keep the config IRQ request failure as a direct return
- Free already requested IRQs only after a VQ IRQ request failure
- Add Fixes and Cc: stable tags
drivers/vdpa/solidrun/snet_main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/solidrun/snet_main.c b/drivers/vdpa/solidrun/snet_main.c
index 28d55315d..3e2cea1e4 100644
--- a/drivers/vdpa/solidrun/snet_main.c
+++ b/drivers/vdpa/solidrun/snet_main.c
@@ -418,11 +418,15 @@ static int snet_request_irqs(struct pci_dev *pdev, struct snet *snet)
snet->vqs[i]->irq_name, snet->vqs[i]);
if (ret) {
SNET_ERR(pdev, "Failed to request IRQ\n");
- return ret;
+ goto err_free_irqs;
}
snet->vqs[i]->irq = irq;
}
return 0;
+
+err_free_irqs:
+ snet_free_irqs(snet);
+ return ret;
}
static void snet_set_status(struct vdpa_device *vdev, u8 status)
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] vdpa: solidrun: Free IRQs after request failure
2026-08-05 1:51 [PATCH v2] vdpa: solidrun: Free IRQs after request failure Xiong Weimin
@ 2026-08-05 5:40 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2026-08-05 5:40 UTC (permalink / raw)
To: Xiong Weimin, virtualization, Alvaro Karsz
Cc: stable, LKML, Eugenio Pérez, Jason Wang, Michael S. Tsirkin,
Xuan Zhuo
> Unwind IRQs already requested by snet_request_irqs() before returning a
> VQ IRQ request error so a later DRIVER_OK retry starts from a clean
> state. The IRQs are requested and freed while the PCI device remains
> bound, so the driver cannot wait for devres cleanup at detach time.
I suggest to avoid duplicate SNET_ERR() calls for the implementation
of the function “snet_request_irqs”.
https://elixir.bootlin.com/linux/v7.2-rc5/source/drivers/vdpa/solidrun/snet_main.c#L400-L426
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-05 5:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 1:51 [PATCH v2] vdpa: solidrun: Free IRQs after request failure Xiong Weimin
2026-08-05 5:40 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox