[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHDcHeZRTwtUNyhY@yilunxu-OptiPlex-7050>
Date: Fri, 11 Jul 2025 17:40:45 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>
Cc: Nicolin Chen <nicolinc@...dia.com>, "jgg@...dia.com" <jgg@...dia.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iommufd: Do not allow _iommufd_object_alloc_ucmd if
abort op is set
On Fri, Jul 11, 2025 at 03:18:53AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@...dia.com>
> > Sent: Friday, July 11, 2025 4:24 AM
> >
> > 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>
>
> Reviewed-by: Kevin Tian <kevin.tian@...el.com>
Reviewed-by: Xu Yilun <yilun.xu@...ux.intel.com>
Powered by blists - more mailing lists