linux-snapdragon/samples/vfio-mdev
Jason Gunthorpe 983add470d vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes
[ Upstream commit de5494af4815a4c9328536c72741229b7de88e7f ]

Convert mbochs to use an atomic scheme for this like mtty was changed
into. The atomic fixes various race conditions with probing. Add the
missing error unwind. Also add the missing kfree of mdev_state->pages.

Fixes: 681c1615f8 ("vfio/mbochs: Convert to use vfio_register_group_dev()")
Reported-by: Cornelia Huck <cohuck@redhat.com>
Co-developed-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Link: https://lore.kernel.org/r/2-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:43:30 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mbochs.c vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes 2021-09-18 13:43:30 +02:00
mdpy-defs.h PCI: Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h 2020-07-09 17:00:47 -05:00
mdpy-fb.c samples: vfio-mdev: fix error handing in mdpy_fb_probe() 2021-05-24 13:40:13 -06:00
mdpy.c vfio/mdpy: Fix memory leak of object mdev_state->vconfig 2021-06-24 13:31:28 -06:00
mtty.c vfio/mtty: Enforce available_instances 2021-06-28 14:09:01 -06:00