* [PATCH] set socket owner (ax25, rose, netrom)
@ 2003-08-29 18:42 Stephen Hemminger
2003-08-31 2:08 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-08-29 18:42 UTC (permalink / raw)
To: ralf, David S. Miller; +Cc: linux-hams, netdev
AX25, NETROM, ROSE all need to set the socket owner field, otherwise it is possible
to remove the module when there are orphaned sockets.
Patch against 2.6.0-test4
diff -Nru a/net/x25/af_x25.c b/net/x25/af_x25.c
--- a/net/x25/af_x25.c Fri Aug 29 11:23:32 2003
+++ b/net/x25/af_x25.c Fri Aug 29 11:23:32 2003
@@ -449,6 +449,7 @@
x25->sk = sk;
sock_init_data(NULL, sk);
+ sk_set_owner(sk, THIS_MODULE);
skb_queue_head_init(&x25->ack_queue);
skb_queue_head_init(&x25->fragment_queue);
@@ -478,6 +479,7 @@
x25 = x25_sk(sk);
sock_init_data(sock, sk);
+ sk_set_owner(sk, THIS_MODULE);
init_timer(&x25->timer);
diff -Nru a/net/rose/af_rose.c b/net/rose/af_rose.c
--- a/net/rose/af_rose.c Fri Aug 29 11:22:10 2003
+++ b/net/rose/af_rose.c Fri Aug 29 11:22:10 2003
@@ -518,6 +518,7 @@
rose = rose_sk(sk);
sock_init_data(sock, sk);
+ sk_set_owner(sk, THIS_MODULE);
skb_queue_head_init(&rose->ack_queue);
#ifdef M_BIT
@@ -556,6 +557,7 @@
rose = rose_sk(sk);
sock_init_data(NULL, sk);
+ sk_set_owner(sk, THIS_MODULE);
skb_queue_head_init(&rose->ack_queue);
#ifdef M_BIT
diff -Nru a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
--- a/net/netrom/af_netrom.c Fri Aug 29 11:22:49 2003
+++ b/net/netrom/af_netrom.c Fri Aug 29 11:22:49 2003
@@ -433,6 +433,7 @@
nr = nr_sk(sk);
sock_init_data(sock, sk);
+ sk_set_owner(sk, THIS_MODULE);
sock->ops = &nr_proto_ops;
sk->sk_protocol = protocol;
@@ -473,6 +474,7 @@
nr = nr_sk(sk);
sock_init_data(NULL, sk);
+ sk_set_owner(sk, THIS_MODULE);
sk->sk_type = osk->sk_type;
sk->sk_socket = osk->sk_socket;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] set socket owner (ax25, rose, netrom)
2003-08-29 18:42 [PATCH] set socket owner (ax25, rose, netrom) Stephen Hemminger
@ 2003-08-31 2:08 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-08-31 2:08 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: ralf, linux-hams, netdev
On Fri, 29 Aug 2003 11:42:08 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> AX25, NETROM, ROSE all need to set the socket owner field, otherwise it is possible
> to remove the module when there are orphaned sockets.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-31 2:08 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:42 [PATCH] set socket owner (ax25, rose, netrom) Stephen Hemminger
2003-08-31 2:08 ` 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).