소스 검색

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>
David S. Miller 17 년 전
부모
커밋
c751e4f8b3
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      net/x25/af_x25.c

+ 1 - 2
net/x25/af_x25.c

@@ -612,8 +612,7 @@ static int x25_release(struct socket *sock)
 			break;
 			break;
 	}
 	}
 
 
-	sock->sk	= NULL;
-	sk->sk_socket	= NULL;	/* Not used, but we should do this */
+	sock_orphan(sk);
 out:
 out:
 	return 0;
 	return 0;
 }
 }