netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, stefanha@redhat.com
Subject: [PATCH RFC v2 0/2] vsock/virtio: fix issues on device hot-unplug
Date: Fri,  4 Jan 2019 15:34:09 +0100	[thread overview]
Message-ID: <20190104143411.95519-1-sgarzare@redhat.com> (raw)

These patches try to handle the hot-unplug of vsock virtio transport device in
a proper way.

Maybe move the vsock_core_init()/vsock_core_exit() functions in the module_init
and module_exit of vsock_virtio_transport module can't be the best way, but the
architecture of vsock_core forces us to this approach for now.

The vsock_core proto_ops expect a valid pointer to the transport device, so we
can't call vsock_core_exit() until there are open sockets.

Another (little more complex) approach during the device removal, could be to
unregister the AF_VSOCK protocol, then reset all sockets and wait for their
destruction. At this point, we can set the transport pointer to NULL.

Any suggestions would be helpful.

v1 -> v2:
 - Fixed commit message of patch 1.

Stefano Garzarella (2):
  vsock/virtio: fix kernel panic after device hot-unplug
  vsock/virtio: reset connected sockets on device removal

 net/vmw_vsock/virtio_transport.c | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

-- 
2.20.1

             reply	other threads:[~2019-01-04 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 14:34 Stefano Garzarella [this message]
2019-01-04 14:34 ` [PATCH RFC v2 1/2] vsock/virtio: fix kernel panic after device hot-unplug Stefano Garzarella
2019-01-04 14:34 ` [PATCH RFC v2 2/2] vsock/virtio: reset connected sockets on device removal Stefano Garzarella
2019-01-29 15:33 ` [PATCH RFC v2 0/2] vsock/virtio: fix issues on device hot-unplug Stefano Garzarella
2019-02-01  8:19   ` Stefan Hajnoczi
2019-02-01  8:44     ` 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=20190104143411.95519-1-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).