From: David S. Miller Date: Tue, 17 Jun 2008 10:05:13 +0000 (-0700) Subject: x25: Use sock_orphan() instead of open-coded (and buggy) variant. X-Git-Tag: v2.6.27-rc1~969^2~305 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c751e4f8b32a3869bb4fec12100952abd9baa0e1;p=linux-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 --- diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index bcb091f713..7b1c6ef045 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; }