mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
iommufd: Assert devices_lock for iommufd_hw_pagetable_has_group()
The hwpt->devices list is locked by this, make it clearer. Link: https://lore.kernel.org/r/1-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
fe15c26ee2
commit
085fcc7eb7
@ -186,6 +186,8 @@ static bool iommufd_hw_pagetable_has_group(struct iommufd_hw_pagetable *hwpt,
|
||||
{
|
||||
struct iommufd_device *cur_dev;
|
||||
|
||||
lockdep_assert_held(&hwpt->devices_lock);
|
||||
|
||||
list_for_each_entry(cur_dev, &hwpt->devices, devices_item)
|
||||
if (cur_dev->group == group)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user