From: Alex Williamson Date: Wed, 8 Apr 2015 14:11:51 +0000 (-0600) Subject: vfio-pci: Fix use after free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a0ff17741c1785b27229a16b5ab77470d71b170;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vfio-pci: Fix use after free Reported by 0-day test infrastructure. Fixes: ecaa1f6a0154 ("vfio-pci: Add VGA arbiter client") Signed-off-by: Alex Williamson --- diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 049b9e9e0a41..69fab0fd15ae 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -953,6 +953,7 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret) { iommu_group_put(group); kfree(vdev); + return ret; } if (vfio_pci_is_vga(pdev)) {