aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorLu Baolu <[email protected]>2023-03-22 14:49:53 +0800
committerJoerg Roedel <[email protected]>2023-03-22 15:45:16 +0100
commitdba9ca9d41f5266194a5e8007db50985d271d0a4 (patch)
tree93e7e2fcca587255b62de0376d7485367889e730 /lib/mpi/mpi-mod.c
parent293f2564f3dd76b749fc31ae4226bd818f860e4f (diff)
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 <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions