[Intel-gfx] [PATCH v14 17/26] vfio: Move device_del() before waiting for the last vfio_device registration refcount
Jason Gunthorpe
jgg at nvidia.com
Fri Jul 14 13:56:05 UTC 2023
On Mon, Jul 10, 2023 at 07:59:19PM -0700, Yi Liu wrote:
> device_del() destroys the vfio-dev/vfioX under the sysfs for vfio_device.
> There is no reason to keep it while the device is going to be unregistered.
>
> This movement is also a preparation for adding vfio_device cdev. Kernel
> should remove the cdev node of the vfio_device to avoid new registration
> refcount increment while the device is going to be unregistered.
>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> ---
> drivers/vfio/vfio_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the Intel-gfx
mailing list