diff options
author | Andy King <acking@vmware.com> | 2014-05-02 02:20:43 +0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-29 13:49:26 +0400 |
commit | 368986ee10b1739f9c2a400ac0fca0779c8fdc7e (patch) | |
tree | 3d5409decce79d872268e3fe015a2e83b063fd55 /include/net/af_vsock.h | |
parent | e78282a5759165273c4a704c842dc808e85b1780 (diff) | |
download | linux-368986ee10b1739f9c2a400ac0fca0779c8fdc7e.tar.xz |
vsock: Make transport the proto owner
[ Upstream commit 2c4a336e0a3e203fab6aa8d8f7bb70a0ad968a6b ]
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...
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Andy King <acking@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/net/af_vsock.h')
-rw-r--r-- | include/net/af_vsock.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 7d64d3609ec9..428277869400 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -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 ****/ |