summaryrefslogtreecommitdiff
path: root/usr/gen_init_cpio.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-07-05 13:04:54 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-08 15:35:17 -0700
commite226121fcc26e69c721a435aa9348a2f452e4d3e (patch)
tree0ef74aa77ece3c192dfef9cf8a251e12ddf8a63d /usr/gen_init_cpio.c
parentb917507e5ad983085d29069369778b16aa03a0a8 (diff)
vsock/virtio: fix flush of works during the .remove()
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. Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'usr/gen_init_cpio.c')
0 files changed, 0 insertions, 0 deletions