Skip to contentSkip to conversation

: Fix econet open-coded sock_orphan().

PATCH New David Miller 1 participant 1 message Jun 17, 2008

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : Fix econet open-coded sock_orphan().

Speaking of orphans, AF_ECONET might be a good candidate for the deprecation schedule. It has no listed maintainer and no known users.

Anyways, applied and pushed to net-next-2.6

econet: Use sock_orphan() instead of open-coded (and buggy) variant.

It doesn't grab the sk_callback_lock, it doesn't NULL out the sk->sk_sleep waitqueue pointer, etc.

---
 net/econet/af_econet.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
net/econet/af_econet.c +1 -3
index 7c9bb13..d35127b 100644
@@ -573,9 +573,7 @@ static int econet_release(struct socket *sock)
 
 	sk->sk_state_change(sk);	/* It is useless. Just for sanity. */
 
-	sock->sk = NULL;
-	sk->sk_socket = NULL;
-	sock_set_flag(sk, SOCK_DEAD);
+	sock_orphan(sk);
 
 	/* Purge queues */
 
Signature · 1 line
1.5.5.1.308.g1fbb5