netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/2] vsock/virtio: fix issues on device hot-unplug
@ 2019-01-04 14:34 Stefano Garzarella
  2019-01-04 14:34 ` [PATCH RFC v2 1/2] vsock/virtio: fix kernel panic after " Stefano Garzarella
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefano Garzarella @ 2019-01-04 14:34 UTC (permalink / raw)
  To: netdev; +Cc: davem, stefanha

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-01  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 14:34 [PATCH RFC v2 0/2] vsock/virtio: fix issues on device hot-unplug Stefano Garzarella
2019-01-04 14:34 ` [PATCH RFC v2 1/2] vsock/virtio: fix kernel panic after " 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

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).