From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Thomas Huth <thuth@redhat.com>,
Zhenzhong Duan <zhenzhong.duan@intel.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>,
Tony Krowiak <akrowiak@linux.ibm.com>
Subject: Re: [PATCH 6/7] vfio/ccw: Fix the missed unrealize() call in error path
Date: Thu, 23 May 2024 10:52:09 +0200 [thread overview]
Message-ID: <5b724d71-9f15-42f5-98f4-a592c0223cfd@redhat.com> (raw)
In-Reply-To: <20240522170107.289532-7-clg@redhat.com>
On 5/22/24 19:01, Cédric Le Goater wrote:
> From: Zhenzhong Duan <zhenzhong.duan@intel.com>
>
> When get name failed, we should call unrealize() so that
> vfio_ccw_realize() is self contained.
>
> Fixes: 909a6254eda ("vfio/ccw: Make vfio cdev pre-openable by passing a file handle")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/vfio/ccw.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index a468fa2342b97e0ee36bd5fb8443025cc90a0453..36f2677a448c5e31523dcc3de7d973ec70e4a13c 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -588,7 +588,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
> }
>
> if (!vfio_device_get_name(vbasedev, errp)) {
> - return;
> + goto out_unrealize;
> }
>
> if (!vfio_attach_device(cdev->mdevid, vbasedev,
> @@ -631,6 +631,7 @@ out_region_err:
> vfio_detach_device(vbasedev);
> out_attach_dev_err:
> g_free(vbasedev->name);
> +out_unrealize:
> if (cdc->unrealize) {
> cdc->unrealize(cdev);
> }
next prev parent reply other threads:[~2024-05-23 8:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 17:01 [PATCH 0/7] s390x/ccw: Error reporting cleanups Cédric Le Goater
2024-05-22 17:01 ` [PATCH 1/7] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool Cédric Le Goater
2024-05-23 8:43 ` Duan, Zhenzhong
2024-05-24 13:13 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 2/7] s390x/css: Make CCWDeviceClass::realize return bool Cédric Le Goater
2024-05-23 8:43 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 3/7] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize() Cédric Le Goater
2024-05-23 8:44 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 4/7] s390x/css: Make S390CCWDeviceClass::realize return bool Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 5/7] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize() Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 6/7] vfio/ccw: Fix the missed unrealize() call in error path Cédric Le Goater
2024-05-23 8:52 ` Cédric Le Goater [this message]
2024-05-22 17:01 ` [PATCH 7/7] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-23 20:27 ` [PATCH 0/7] s390x/ccw: Error reporting cleanups Eric Farman
2024-05-27 6:23 ` Thomas Huth
2024-05-27 6:43 ` Cédric Le Goater
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=5b724d71-9f15-42f5-98f4-a592c0223cfd@redhat.com \
--to=clg@redhat.com \
--cc=akrowiak@linux.ibm.com \
--cc=farman@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=zhenzhong.duan@intel.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;
as well as URLs for NNTP newsgroup(s).