From: Jason Gunthorpe <jgg@nvidia.com>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: kevin.tian@intel.com, yilun.xu@linux.intel.com,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommufd: Do not allow _iommufd_object_alloc_ucmd if abort op is set
Date: Mon, 14 Jul 2025 13:51:26 -0300 [thread overview]
Message-ID: <20250714165126.GH2067380@nvidia.com> (raw)
In-Reply-To: <20250710202354.1658511-1-nicolinc@nvidia.com>
On Thu, Jul 10, 2025 at 01:23:54PM -0700, Nicolin Chen wrote:
> An abort op was introduced to allow its caller to invoke it within a lock
> in the caller's function. On the other hand, _iommufd_object_alloc_ucmd()
> would invoke the abort op in iommufd_object_abort_and_destroy() that must
> be outside the caller's lock. So, these two cannot work together.
>
> Add a validation in the _iommufd_object_alloc_ucmd(). Pick -EOPNOTSUPP to
> reject the function call, indicating that the object allocator is buggy.
>
> Suggested-by: Xu Yilun <yilun.xu@linux.intel.com>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/iommufd/main.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
Applied
Thanks,
Jason
prev parent reply other threads:[~2025-07-14 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 20:23 [PATCH] iommufd: Do not allow _iommufd_object_alloc_ucmd if abort op is set Nicolin Chen
2025-07-11 3:18 ` Tian, Kevin
2025-07-11 9:40 ` Xu Yilun
2025-07-14 16:51 ` Jason Gunthorpe [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=20250714165126.GH2067380@nvidia.com \
--to=jgg@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox