[PATCH] (1/13) appletalk - ddp set socket owner
flat view
DORMANTno replies
From: Stephen Hemminger <hidden>
Date: 2003-08-29 20:55:55
From: Stephen Hemminger <hidden>
Date: 2003-08-29 20:55:55
DDP needs to set the socket owner, without this it is possible to OOPS. What happens is a socket is closed, but data is outstanding so it is orphaned to be cleaned up later. Then if appletalk module is unloaded, the timer code ends up referencing dead memory. By setting the owner field, the module can't be unloaded. Path applies to 2.6.0-test4. diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c
--- a/net/appletalk/ddp.c Fri Aug 29 11:02:16 2003
+++ b/net/appletalk/ddp.c Fri Aug 29 11:02:16 2003@@ -983,6 +983,8 @@ rc = 0; sock->ops = &atalk_dgram_ops; sock_init_data(sock, sk); + sk_set_owner(sk, THIS_MODULE); + /* Checksums on by default */ sk->sk_zapped = 1; out: