summaryrefslogtreecommitdiffstats
path: root/lib/radix-tree.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-07-17 15:12:07 -0300
committerJason Gunthorpe <jgg@nvidia.com>2023-07-26 10:20:02 -0300
commit31422dff187b243c58f3a97d16bbe9e9ada639fe (patch)
treebbcd275d2b3a104270b676506cd8df0febab80dc /lib/radix-tree.h
parent70eadc7fc7ef29bfe0e361376983822b5e36dd67 (diff)
downloadlinux-stable-31422dff187b243c58f3a97d16bbe9e9ada639fe.tar.gz
linux-stable-31422dff187b243c58f3a97d16bbe9e9ada639fe.tar.bz2
linux-stable-31422dff187b243c58f3a97d16bbe9e9ada639fe.zip
iommufd: Fix locking around hwpt allocation
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") Link: https://lore.kernel.org/r/11-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com Reviewed-by: Kevin Tian <kevin.tian@intel.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'lib/radix-tree.h')
0 files changed, 0 insertions, 0 deletions