aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorStefano Garzarella <[email protected]>2019-07-05 13:04:54 +0200
committerDavid S. Miller <[email protected]>2019-07-08 15:35:17 -0700
commite226121fcc26e69c721a435aa9348a2f452e4d3e (patch)
tree0ef74aa77ece3c192dfef9cf8a251e12ddf8a63d /drivers/fpga/fpga-bridge.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 <[email protected]> Signed-off-by: Stefano Garzarella <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions