DORMANTno replies

[PATCH]: Fix econet open-coded sock_orphan().

From: David Miller <davem@davemloft.net>
Date: 2008-06-17 10:03:36
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/econet/af_econet.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 7c9bb13..d35127b 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -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 */
 
-- 
1.5.5.1.308.g1fbb5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help