vsock/virtio: stop workers during the .remove()
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 5 Jul 2019 11:04:53 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 07:48:11 +0000 (09:48 +0200)
commitfefdb41bd4b808c512c126ca14420ff3a8450908
treec0912265d96c8938e45eaa9f7b3a0c0eaf5a3c64
parentd87ebcd52eeeed8923c3eba266fd1907fbd067c6
vsock/virtio: stop workers during the .remove()

[ Upstream commit 17dd1367389cfe7f150790c83247b68e0c19d106 ]

Before to call vdev->config->reset(vdev) we need to be sure that
no one is accessing the device, for this reason, we add new variables
in the struct virtio_vsock to stop the workers during the .remove().

This patch also add few comments before vdev->config->reset(vdev)
and vdev->config->del_vqs(vdev).

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/vmw_vsock/virtio_transport.c