linux-stable/drivers/vfio
Qiushi Wu fcc43e9661 vfio/mdev: Fix reference count leak in add_mdev_supported_type
[ Upstream commit aa8ba13cae ]

kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object. Thus,
replace kfree() by kobject_put() to fix this issue. Previous
commit "b8eb718348b8" fixed a similar problem.

Fixes: 7b96953bc6 ("vfio: Mediated device Core driver")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-25 15:41:56 +02:00
..
mdev vfio/mdev: Fix reference count leak in add_mdev_supported_type 2020-06-25 15:41:56 +02:00
pci vfio-pci: Mask cap zero 2020-06-25 15:41:53 +02:00
platform vfio: platform: Fix reset module leak in error path 2018-08-03 07:50:22 +02:00
Kconfig
Makefile
vfio.c vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:54 +02:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: Get rid of possible infinite loop 2019-12-05 15:37:42 +01:00
vfio_iommu_type1.c vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() 2020-05-05 19:15:51 +02:00
vfio_spapr_eeh.c
virqfd.c