RE: [PATCH v6 10/19] iommufd: Allow a hwpt to be aborted after allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Friday, April 21, 2023 2:51 AM
> 
> During creation the hwpt must have the ioas->mutex held until the object
> is finalized. This means we need to be able to call
> iommufd_object_abort_and_destroy() while holding the mutex.
> 
> Since iommufd_hw_pagetable_destroy() also needs the mutex this is
> problematic.
> 
> Fix it by creating a special abort op for the object that can assume the
> caller is holding the lock, as required by the contract.
> 
> The next patch will add another iommufd_object_abort_and_destroy() for a
> hwpt.
> 
> Fixes: e8d57210035b ("iommufd: Add kAPI toward external drivers for
> physical devices")
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux