Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-14 12:10:02 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-14 12:30:22 +0200
commitdc08a94dbb19cbfe7895bcd7a456cbaa9d439c2d (patch)
tree2160d85f138d04c0baf3acd1e3ff5527875186f1
parentcad3e76bf2ded4e0742ce4ce24eb8972e08d5eae (diff)
vsock/virtio: reset connected sockets on device removal
(bsc#1051510). suse-commit: f367a55e2c981fb9bcf3502d9f4ca03fcfc1ef1e
-rw-r--r--net/vmw_vsock/virtio_transport.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 8cdf6ddec9b7..2ff751eba037 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -634,6 +634,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev)
flush_work(&vsock->event_work);
flush_work(&vsock->send_pkt_work);
+ /* Reset all connected sockets when the device disappear */
+ vsock_for_each_connected_socket(virtio_vsock_reset_sock);
+
vdev->config->reset(vdev);
mutex_lock(&vsock->rx_lock);