Messages in this thread | | | Date | Mon, 1 Jul 2019 16:09:30 +0100 | From | Stefan Hajnoczi <> | Subject | Re: [PATCH v2 3/3] vsock/virtio: fix flush of works during the .remove() |
| |
On Fri, Jun 28, 2019 at 02:36:59PM +0200, Stefano Garzarella wrote: > This patch moves the flush of works after vdev->config->del_vqs(vdev), > because we need to be sure that no workers run before to free the > 'vsock' object. > > Since we stopped the workers using the [tx|rx|event]_run flags, > we are sure no one is accessing the device while we are calling > vdev->config->reset(vdev), so we can safely move the workers' flush. > > Before the vdev->config->del_vqs(vdev), workers can be scheduled > by VQ callbacks, so we must flush them after del_vqs(), to avoid > use-after-free of 'vsock' object.
Nevermind, I looked back at Patch 2 and saw the send_pkt and loopback work functions were also updated. Thanks!
Stefan [unhandled content-type:application/pgp-signature] | |