vsock: Make transport the proto owner
Subsystems (5)
PATCH 1/1 vsock: Make transport the proto owner
Right now the core vsock module is the owner of the proto family. This means there's nothing preventing the transport module from unloading if there are open sockets, which results in a panic. Fix that by allowing the transport to be the owner, which will refcount it properly.
Includes version bump to 1.0.1.0-k
Passes checkpatch this time, I swear...
--- include/net/af_vsock.h | 6 ++++- net/vmw_vsock/af_vsock.c | 47 +++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 26 deletions(-)
include/net/af_vsock.h +5 -1
@@ -155,7 +155,11 @@ struct vsock_transport {/**** CORE ****/ -int vsock_core_init (const struct vsock_transport *t); +int __vsock_core_init (const struct vsock_transport *t,struct module *owner); +static inline int vsock_core_init (const struct vsock_transport *t) +{ +return __vsock_core_init (t,THIS_MODULE ); +}void vsock_core_exit (void );/**** UTILS ****/
net/vmw_vsock/af_vsock.c +22 -25
72 lines not on this page · raw message
Signature · 1 line
1.7.4.1
From: Andy King <[email protected]>
Date: Thu, 1 May 2014 15:20:43 -0700
Quoted 10 lines
Right now the core vsock module is the owner of the proto family. This means there's nothing preventing the transport module from unloading if there are open sockets, which results in a panic. Fix that by allowing the transport to be the owner, which will refcount it properly.
Includes version bump to 1.0.1.0-k
Passes checkpatch this time, I swear...
Please do not explicitly CC: stable for networking submissions, instead please just ask me to queue it up for -stable submission since I handle networking -stable myself.
Quoted 2 lines
Acked-by Dmitry Torokhov <[email protected]>Signed-off-by Andy King <[email protected]>
Applied, thanks.