We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfa718 commit 291872aCopy full SHA for 291872a
drivers/vfio/vfio_main.c
@@ -332,6 +332,12 @@ void vfio_unregister_group_dev(struct vfio_device *device)
332
bool interrupted = false;
333
long rc;
334
335
+ /*
336
+ * Prevent new device opened by userspace via the
337
+ * VFIO_GROUP_GET_DEVICE_FD in the group path.
338
+ */
339
+ vfio_device_group_unregister(device);
340
+
341
vfio_device_put_registration(device);
342
rc = try_wait_for_completion(&device->comp);
343
while (rc <= 0) {
@@ -355,8 +361,6 @@ void vfio_unregister_group_dev(struct vfio_device *device)
355
361
}
356
362
357
363
358
- vfio_device_group_unregister(device);
359
-
360
364
/* Balances device_add in register path */
365
device_del(&device->device);
366
0 commit comments