Re: [PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error path

2023-10-11 Thread Cédric Le Goater
On 10/11/23 22:09, Eric Auger wrote: In vfio_realize, on the error path, we currently call vfio_detach_device() after a successful vfio_attach_device. While this looks natural, vfio_instance_finalize also induces a vfio_detach_device(), and it seems to be the right place instead as other resource

Re: [PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error path

2023-10-11 Thread Eric Auger
redhat.com; c...@redhat.com; Duan, >> Zhenzhong ; Liu, Yi L ; >> yangh...@redhat.com >> Subject: [PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error >> path >> >> In vfio_realize, on the error path, we currently call >> vfio_detach_

RE: [PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error path

2023-10-11 Thread Duan, Zhenzhong
ubject: [PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error >path > >In vfio_realize, on the error path, we currently call >vfio_detach_device() after a successful vfio_attach_device. >While this looks natural, vfio_instance_finalize also induces >a vfio_detach_de

[PATCH] vfio/pci: Remove vfio_detach_device from vfio_realize error path

2023-10-11 Thread Eric Auger
In vfio_realize, on the error path, we currently call vfio_detach_device() after a successful vfio_attach_device. While this looks natural, vfio_instance_finalize also induces a vfio_detach_device(), and it seems to be the right place instead as other resources are released there which happen to be