Skip to contentSkip to conversation

vsock: Make transport the proto owner

PATCH Applied Andy King 2 participants 2 messages May 1, 2014 – May 5, 2014

Subsystems (5)
lore
Share & tools
lore

Andy King

author
#0 lore raw

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
index 7d64d36..4282778 100644
@@ -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
maintainer Applied
#1 lore raw

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

Applied, thanks.