Skip to contentSkip to conversation

: Fix open-coded sock_orphan() in x25.

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

Subsystems (3)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

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

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.

---
 net/x25/af_x25.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
net/x25/af_x25.c +1 -2
index bcb091f..7b1c6ef 100644
@@ -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;
 }
Signature · 1 line
1.5.5.1.308.g1fbb5