From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xiong Weimin <xiongweimin@kylinos.cn>
Cc: "Alvaro Karsz" <alvaro.karsz@solid-run.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vdpa: solidrun: Free IRQs after request failure
Date: Tue, 4 Aug 2026 17:19:37 -0400 [thread overview]
Message-ID: <20260804171850-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260804092617.1344317-1-xiongweimin@kylinos.cn>
On Tue, Aug 04, 2026 at 05:26:17PM +0800, Xiong Weimin wrote:
> Unwind any IRQs already requested by snet_request_irqs() before returning
> an error so a later retry starts from a clean state.
>
> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
Here too. Pls tell us what is wrong and how it is fixed. E.g.:
Currently .... This is a problem because ... We can not do .... because
... To address .... And then ....
> ---
> drivers/vdpa/solidrun/snet_main.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vdpa/solidrun/snet_main.c b/drivers/vdpa/solidrun/snet_main.c
> index 28d55315d..aa3ae3876 100644
> --- a/drivers/vdpa/solidrun/snet_main.c
> +++ b/drivers/vdpa/solidrun/snet_main.c
> @@ -407,7 +407,7 @@ static int snet_request_irqs(struct pci_dev *pdev, struct snet *snet)
> snet->cfg_irq_name, snet);
> if (ret) {
> SNET_ERR(pdev, "Failed to request IRQ\n");
> - return ret;
> + goto err_free_irqs;
> }
> snet->cfg_irq = irq;
>
> @@ -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
prev parent reply other threads:[~2026-08-04 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 9:26 [PATCH] vdpa: solidrun: Free IRQs after request failure Xiong Weimin
2026-08-04 16:54 ` Markus Elfring
2026-08-05 1:39 ` Xiong Weimin
2026-08-04 21:19 ` Michael S. Tsirkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804171850-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alvaro.karsz@solid-run.com \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xiongweimin@kylinos.cn \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox