diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-06-28 14:36:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-01 19:09:07 -0700 |
commit | 0d20e56ecca0f5025f9041d11ee247129b5e48ce (patch) | |
tree | 8bc5871ecca3409ab4de4e17fd9b481a2f965705 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 17dd1367389cfe7f150790c83247b68e0c19d106 (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 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions