From: Nicolin Chen <nicolinc@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <iommu@lists.linux.dev>, "Joerg Roedel (AMD)" <joro@8bytes.org>,
"Robin Murphy" <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>,
"Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
Kevin Tian <kevin.tian@intel.com>, <patches@lists.linux.dev>,
Peiyang He <peiyang_he@smail.nju.edu.cn>,
Xu Yilun <yilun.xu@linux.intel.com>
Subject: Re: [PATCH] iommufd/selftest: Simplify iommufd_device_remove_vdev()
Date: Mon, 13 Jul 2026 12:55:11 -0700 [thread overview]
Message-ID: <alVCn344G6l2lYXe@nvidia.com> (raw)
In-Reply-To: <0-v1-719003d53a5b+38b-iommufd_fault_inj_vdev_jgg@nvidia.com>
On Mon, Jul 13, 2026 at 02:25:11PM -0300, Jason Gunthorpe wrote:
> Peiyang reports that this function indirectly includes a fault injection
> point through iommufd_get_object() that was intended to cover the uAPI use
> of object IDs, not in places like this that cannot fail.
>
> On deeper inspection this can be written using a dedicated helper to
> obtain a users refcount relying entirely on the xa locking instead of
> going through the whole get/put scheme. The new helper doesn't need the
> fault injection point.
>
> Fixes: 850f14f5b919 ("iommufd: Destroy vdevice on idevice destroy")
> Reported-by: Peiyang He <peiyang_he@smail.nju.edu.cn>
> Closes: https://lore.kernel.org/r/870BB9ADBBEDDD1A+37c5bfab-ad32-4fc5-a302-57c81a8432b5@smail.nju.edu.cn
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
next prev parent reply other threads:[~2026-07-13 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 17:25 [PATCH] iommufd/selftest: Simplify iommufd_device_remove_vdev() Jason Gunthorpe
2026-07-13 19:55 ` Nicolin Chen [this message]
2026-07-14 1:11 ` Tian, Kevin
2026-07-14 13:46 ` Jason Gunthorpe
2026-07-14 1:14 ` Tian, Kevin
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=alVCn344G6l2lYXe@nvidia.com \
--to=nicolinc@nvidia.com \
--cc=aneesh.kumar@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=patches@lists.linux.dev \
--cc=peiyang_he@smail.nju.edu.cn \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yilun.xu@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.