[PATCH] (2/3) llc - need to set owner on created sockets.

DORMANTno replies

From: Stephen Hemminger <hidden>
Date: 2003-08-29 17:48:57

LLC needs to set owner field on sockets it creates, otherwise
it is possible to remove module with detached sockets still
outstanding.

diff -Nru a/net/llc/llc_main.c b/net/llc/llc_main.c
--- a/net/llc/llc_main.c	Fri Aug 29 09:27:28 2003
+++ b/net/llc/llc_main.c	Fri Aug 29 09:27:28 2003
@@ -229,6 +229,7 @@
 	if (llc_sk_init(sk))
 		goto outsk;
 	sock_init_data(NULL, sk);
+	sk_set_owner(sk, THIS_MODULE);
 #ifdef LLC_REFCNT_DEBUG
 	atomic_inc(&llc_sock_nr);
 	printk(KERN_DEBUG "LLC socket %p created in %s, now we have %d alive\n", sk,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help