From: Halil Pasic <pasic@linux.ibm.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: ruanjinjie <ruanjinjie@huawei.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
Jason Herne <jjherne@linux.ibm.com>,
Kirti Wankhede <kwankhede@nvidia.com>,
Kevin Tian <kevin.tian@intel.com>,
Eric Farman <farman@linux.ibm.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Halil Pasic <pasic@linux.ibm.com>
Subject: Re: [PATCH] vfio/ap/ccw/samples: Fix device_register() unwind path
Date: Tue, 6 Dec 2022 11:02:25 +0100 [thread overview]
Message-ID: <20221206110225.681a9bd6.pasic@linux.ibm.com> (raw)
In-Reply-To: <166999942139.645727.12439756512449846442.stgit@omen>
On Fri, 02 Dec 2022 09:46:15 -0700
Alex Williamson <alex.williamson@redhat.com> wrote:
> We always need to call put_device() if device_register() fails.
> All vfio drivers calling device_register() include a similar unwind
> stack via gotos, therefore split device_unregister() into its
> device_del() and put_device() components in the unwind path, and
> add a goto target to handle only the put_device() requirement.
>
> Reported-by: Ruan Jinjie <ruanjinjie@huawei.com>
> Link: https://lore.kernel.org/all/20221118032827.3725190-1-ruanjinjie@huawei.com
> Fixes: d61fc96f47fd ("sample: vfio mdev display - host device")
> Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
> Fixes: a5e6e6505f38 ("sample: vfio bochs vbe display (host device for bochs-drm)")
> Fixes: 9e6f07cd1eaa ("vfio/ccw: create a parent struct")
> Fixes: 36360658eb5a ("s390: vfio_ap: link the vfio_ap devices to the vfio_ap bus subsystem")
> Cc: Tony Krowiak <akrowiak@linux.ibm.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: Jason Herne <jjherne@linux.ibm.com>
> Cc: Kirti Wankhede <kwankhede@nvidia.com>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
prev parent reply other threads:[~2022-12-06 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 16:46 [PATCH] vfio/ap/ccw/samples: Fix device_register() unwind path Alex Williamson
2022-12-05 13:39 ` Jason J. Herne
2022-12-05 19:20 ` Anthony Krowiak
2022-12-05 22:36 ` Alex Williamson
2022-12-06 10:02 ` Halil Pasic [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=20221206110225.681a9bd6.pasic@linux.ibm.com \
--to=pasic@linux.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=farman@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ruanjinjie@huawei.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