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]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux