aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorYi Liu <[email protected]>2022-06-27 00:41:19 -0700
committerAlex Williamson <[email protected]>2022-06-30 11:07:07 -0600
commit330c179976f3801526bf222b010b669bf6743098 (patch)
tree4e8077edabb98b8e3d2de36a72e28e036f88ea97 /scripts/gdb/linux/utils.py
parentd1877e639bc6bf1c3131eda3f9ede73f8da96c22 (diff)
vfio: Move "device->open_count--" out of group_rwsem in vfio_device_open()
We do not protect the vfio_device::open_count with group_rwsem elsewhere (see vfio_device_fops_release as a comparison, where we already drop group_rwsem before open_count--). So move the group_rwsem unlock prior to open_count--. This change now also drops group_rswem before setting device->kvm = NULL, but that's also OK (again, just like vfio_device_fops_release). The setting of device->kvm before open_device is technically done while holding the group_rwsem, this is done to protect the group kvm value we are copying from, and we should not be relying on that to protect the contents of device->kvm; instead we assume this value will not change until after the device is closed and while under the dev_set->lock. Cc: Matthew Rosato <[email protected]> Cc: Jason Gunthorpe <[email protected]> Signed-off-by: Yi Liu <[email protected]> Reviewed-by: Matthew Rosato <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions