diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-06 03:19:07 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-08-11 17:50:11 +0200 |
commit | 3cb24827147b75557bddc5b39d63897786935b14 (patch) | |
tree | 4b1dc7e88f644f777559fdc55f7c86ef0cc785b5 /samples/Makefile | |
parent | vfio/pci: Reorganize VFIO_DEVICE_PCI_HOT_RESET to use the device set (diff) | |
download | linux-3cb24827147b75557bddc5b39d63897786935b14.tar.xz linux-3cb24827147b75557bddc5b39d63897786935b14.zip |
vfio/mbochs: Fix close when multiple device FDs are open
mbochs_close() iterates over global device state and frees it. Currently
this is done every time a device FD is closed, but if multiple device FDs
are open this could corrupt other still active FDs.
Change this to use close_device() so it only runs on the last close.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/11-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples/Makefile')
0 files changed, 0 insertions, 0 deletions