iommufd: Add iommufd_lock_obj() around the auto-domains hwpts
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 1 Mar 2023 19:30:19 +0000 (15:30 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 6 Mar 2023 14:51:56 +0000 (10:51 -0400)
commit7214c1c85fe464929e9c32f90f81d65cd44b8ff6
treebb1aa2902ff760c27a2d1f028711ed57c5d8e3dd
parent085fcc7eb759c2b483f85b322e8c5146610010fd
iommufd: Add iommufd_lock_obj() around the auto-domains hwpts

A later patch will require this locking - currently under the ioas mutex
the hwpt can not have a 0 reference and be on the list.

Link: https://lore.kernel.org/r/2-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/device.c