Re: [PATCH] vfio/pci: vfio_pci_put_device on failure

2025-05-27 Thread John Levon
On Tue, May 27, 2025 at 01:56:52PM -0700, Steve Sistare wrote: > If vfio_realize fails after vfio_device_attach, it should call > vfio_device_detach during error recovery. If it fails after > vfio_device_get_name, it should free vbasedev->name. If it fails > after vfio_pci_config_setup, it shoul

[PATCH] vfio/pci: vfio_pci_put_device on failure

2025-05-27 Thread Steve Sistare
If vfio_realize fails after vfio_device_attach, it should call vfio_device_detach during error recovery. If it fails after vfio_device_get_name, it should free vbasedev->name. If it fails after vfio_pci_config_setup, it should free vdev->msix. To fix all, call vfio_pci_put_device(). Signed-off-