netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irda - need to set socket owner
@ 2003-08-29 18:44 Stephen Hemminger
  2003-08-31  2:09 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-08-29 18:44 UTC (permalink / raw)
  To: Jean Tourrilhes, David S. Miller; +Cc: irda-users, netdev

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).

diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c
--- a/net/irda/af_irda.c	Fri Aug 29 11:21:32 2003
+++ b/net/irda/af_irda.c	Fri Aug 29 11:21:32 2003
@@ -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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-31  2:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-29 18:44 [PATCH] irda - need to set socket owner Stephen Hemminger
2003-08-31  2:09 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).