| To: | Jay Schulist <jschlst@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] (1/13) appletalk - ddp set socket owner |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Fri, 29 Aug 2003 13:55:55 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
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:
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] (11/13) move /proc/net/aarp to /proc/net/atalk/arp, Stephen Hemminger |
|---|---|
| Next by Date: | Re: [PATCH 1/4] Net device error logging, revised, Jim Keniston |
| Previous by Thread: | [PATCH] (11/13) move /proc/net/aarp to /proc/net/atalk/arp, Stephen Hemminger |
| Next by Thread: | Re: [Linux-ATM-General] Neighbor Table Overflow? (fwd), John Fraizer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |