diff options
author | 2019-07-05 13:04:54 +0200 | |
---|---|---|
committer | 2019-07-08 15:35:17 -0700 | |
commit | e226121fcc26e69c721a435aa9348a2f452e4d3e (patch) | |
tree | 0ef74aa77ece3c192dfef9cf8a251e12ddf8a63d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | vsock/virtio: stop workers during the .remove() (diff) | |
download | wireguard-linux-e226121fcc26e69c721a435aa9348a2f452e4d3e.tar.xz wireguard-linux-e226121fcc26e69c721a435aa9348a2f452e4d3e.zip |
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions