RE: [PATCH v6 11/19] iommufd: Fix locking around hwpt 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
> 
> Due to the auto_domains mechanism the ioas->mutex must be held until
> the hwpt is completely setup by iommufd_object_abort_and_destroy() or
> iommufd_object_finalize().
> 
> This prevents a concurrent iommufd_device_auto_get_domain() from seeing
> an incompletely initialized object through the ioas->hwpt_list.
> 
> To make this more consistent move the unlock until after finalize.
> 
> 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