[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250714165126.GH2067380@nvidia.com>
Date: Mon, 14 Jul 2025 13:51:26 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, yilun.xu@...ux.intel.com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommufd: Do not allow _iommufd_object_alloc_ucmd if
abort op is set
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@...ux.intel.com>
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> ---
> drivers/iommu/iommufd/main.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
Applied
Thanks,
Jason
Powered by blists - more mailing lists