Home Home > GIT Browse
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
commitf367a55e2c981fb9bcf3502d9f4ca03fcfc1ef1e (patch)
tree508f2a204a9d5a66ceb7f835f427217da9b925a4
parentb9f3567b69773c411ba2e3187f27aa80b09dcc97 (diff)
vsock/virtio: reset connected sockets on device removal
(bsc#1051510).
-rw-r--r--patches.fixes/vsock-virtio-reset-connected-sockets-on-device-remov.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.fixes/vsock-virtio-reset-connected-sockets-on-device-remov.patch b/patches.fixes/vsock-virtio-reset-connected-sockets-on-device-remov.patch
new file mode 100644
index 0000000000..13a23d699f
--- /dev/null
+++ b/patches.fixes/vsock-virtio-reset-connected-sockets-on-device-remov.patch
@@ -0,0 +1,37 @@
+From 85965487abc540368393a15491e6e7fcd230039d Mon Sep 17 00:00:00 2001
+From: Stefano Garzarella <sgarzare@redhat.com>
+Date: Fri, 1 Feb 2019 12:42:07 +0100
+Subject: [PATCH] vsock/virtio: reset connected sockets on device removal
+Git-commit: 85965487abc540368393a15491e6e7fcd230039d
+Patch-mainline: v5.0-rc6
+References: bsc#1051510
+
+When the virtio transport device disappear, we should reset all
+connected sockets in order to inform the users.
+
+Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
+Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/vmw_vsock/virtio_transport.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
+index 9dae54698737..15eb5d3d4750 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);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index ea19fc73ec..70cff1a4b7 100644
--- a/series.conf
+++ b/series.conf
@@ -20963,6 +20963,7 @@
patches.fixes/bpf-fix-lockdep-false-positive-in-percpu_freelist.patch
patches.fixes/bpf-Fix-syscall-s-stackmap-lookup-potential-deadlock.patch
patches.fixes/vsock-virtio-fix-kernel-panic-after-device-hot-unplu.patch
+ patches.fixes/vsock-virtio-reset-connected-sockets-on-device-remov.patch
patches.suse/net-systemport-Fix-WoL-with-password-after-deep-slee.patch
patches.suse/net-dp83640-expire-old-TX-skb.patch
patches.suse/0001-s390-qeth-fix-use-after-free-in-error-path.patch