DORMANTno replies

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

From: David Miller <davem@davemloft.net>
Date: 2008-06-17 10:06:45
Also in: linux-hams
Subsystem: networking [general], the rest, x.25 stack · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Martin Schiller

This is similar to the AF_ECONET patch I just posted.

Applied and pushed to net-next-2.6

x25: 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/x25/af_x25.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index bcb091f..7b1c6ef 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -612,8 +612,7 @@ static int x25_release(struct socket *sock)
 			break;
 	}
 
-	sock->sk	= NULL;
-	sk->sk_socket	= NULL;	/* Not used, but we should do this */
+	sock_orphan(sk);
 out:
 	return 0;
 }
-- 
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