From: Stephen Hemminger <shemminger@osdl.org>
To: Jean Tourrilhes <jt@bougret.hpl.hp.com>,
"David S. Miller" <davem@redhat.com>
Cc: irda-users@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [PATCH] irda - need to set socket owner
Date: Fri, 29 Aug 2003 11:44:06 -0700 [thread overview]
Message-ID: <20030829114406.52a429bd.shemminger@osdl.org> (raw)
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 */
next reply other threads:[~2003-08-29 18:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 18:44 Stephen Hemminger [this message]
2003-08-31 2:09 ` [PATCH] irda - need to set socket owner David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030829114406.52a429bd.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=davem@redhat.com \
--cc=irda-users@lists.sourceforge.net \
--cc=jt@bougret.hpl.hp.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).