summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2023-03-22 09:49:53 +0300
committerJoerg Roedel <jroedel@suse.de>2023-03-22 17:45:16 +0300
commitdba9ca9d41f5266194a5e8007db50985d271d0a4 (patch)
tree93e7e2fcca587255b62de0376d7485367889e730 /tools/perf/scripts/python/libxed.py
parent293f2564f3dd76b749fc31ae4226bd818f860e4f (diff)
downloadlinux-dba9ca9d41f5266194a5e8007db50985d271d0a4.tar.xz
iommu: Same critical region for device release and removal
In a non-driver context, it is crucial to ensure the consistency of a device's iommu ops. Otherwise, it may result in a situation where a device is released but it's iommu ops are still used. Put the ops->release_device and __iommu_group_remove_device() in a same group->mutext critical region, so that, as long as group->mutex is held and the device is in its group's device list, its iommu ops are always consistent. Add check of group ownership if the released device is the last one. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20230322064956.263419-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions