From: David S. Miller Date: Tue, 17 Jun 2008 10:01:47 +0000 (-0700) Subject: econet: Use sock_orphan() instead of open-coded (and buggy) variant. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0efffaf9d57f54a864b739176d1f659a69486e8b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 --- diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 7c9bb13b153..d35127bb84e 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 */