From: Stefano Garzarella <sgarzare@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, stefanha@redhat.com
Subject: [PATCH RFC 2/2] vsock/virtio: reset connected sockets on device removal
Date: Thu, 20 Dec 2018 13:15:35 +0100 [thread overview]
Message-ID: <20181220121535.232796-3-sgarzare@redhat.com> (raw)
In-Reply-To: <20181220121535.232796-1-sgarzare@redhat.com>
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>
---
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.19.2
next prev parent reply other threads:[~2018-12-20 12:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 12:15 [PATCH RFC 0/2] vsock/virtio: fix issues on device hot-unplug Stefano Garzarella
2018-12-20 12:15 ` [PATCH RFC 1/2] vsock/virtio: fix kernel panic after " Stefano Garzarella
2018-12-20 17:09 ` Stefano Garzarella
2019-01-02 9:39 ` Stefan Hajnoczi
2019-01-02 10:01 ` Stefano Garzarella
2019-01-03 10:03 ` Stefan Hajnoczi
2019-01-03 14:09 ` Stefano Garzarella
2019-01-04 11:43 ` Stefan Hajnoczi
2018-12-20 12:15 ` Stefano Garzarella [this message]
2019-01-02 9:43 ` [PATCH RFC 2/2] vsock/virtio: reset connected sockets on device removal Stefan Hajnoczi
2019-01-04 11:44 ` [PATCH RFC 0/2] vsock/virtio: fix issues on device hot-unplug Stefan Hajnoczi
2019-01-04 14:25 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181220121535.232796-3-sgarzare@redhat.com \
--to=sgarzare@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).