Skip to contentSkip to conversation

irda - need to set socket owner

PATCH Applied Stephen Hemminger 2 participants 2 messages Aug 29, 2003 – Aug 31, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irda - need to set socket owner

All protocols need to set the socket owner field to prevent module unloading when there are still orphaned sockets.

Patch against 2.6.0-test4 (but should work on 2.4 as well).

net/irda/af_irda.c +1 -0
diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c
@@ -1098,6 +1098,7 @@
 
 	/* Initialise networking socket struct */
 	sock_init_data(sock, sk);	/* Note : set sk->sk_refcnt to 1 */
+	sk_set_owner(sk, THIS_MODULE);
 	sk->sk_family = PF_IRDA;
 	sk->sk_protocol = protocol;
 	/* Link networking socket and IrDA socket structs together */
#1 lore raw
Quoted 2 lines · On Fri, 29 Aug 2003 11:44:06 -0700 Stephen Hemminger <[email protected]>…

All protocols need to set the socket owner field to prevent module unloading when there are still orphaned sockets.

Applied, thanks.