WSL2-Linux-Kernel/samples/vfio-mdev
Jason Gunthorpe 3cb2482714 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>
2021-08-11 09:50:11 -06:00
..
Makefile
mbochs.c vfio/mbochs: Fix close when multiple device FDs are open 2021-08-11 09:50:11 -06:00
mdpy-defs.h
mdpy-fb.c
mdpy.c vfio/samples: Delete useless open/close 2021-08-11 09:50:11 -06:00
mtty.c vfio/samples: Delete useless open/close 2021-08-11 09:50:11 -06:00