Right.Yes, but any dereference that is not done in vq_callbacks will be veryThis is still suspicious, can we access the_virtio_vsock through vdev->priv?We will free the object only after calling the del_vqs(), so we are sure
If yes, we may still get use-after-free since it was not protected by RCU.
that the vq_callbacks ended and will no longer be invoked.
So, IIUC it shouldn't happen.
dangerous in the future.
Do you think make sense to continue with this series in order to fix the
hot-unplug issue, then I'll work to refactor the driver code to use the refcnt
(as you suggested in patch 2) and singleton for the_virtio_vsock?
Thanks,
Stefano