aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 5b6a9431b017..c0fc6bdad1e3 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2357,10 +2357,13 @@ void release_sock(struct sock *sk)
2357 if (sk->sk_backlog.tail) 2357 if (sk->sk_backlog.tail)
2358 __release_sock(sk); 2358 __release_sock(sk);
2359 2359
2360 /* Warning : release_cb() might need to release sk ownership,
2361 * ie call sock_release_ownership(sk) before us.
2362 */
2360 if (sk->sk_prot->release_cb) 2363 if (sk->sk_prot->release_cb)
2361 sk->sk_prot->release_cb(sk); 2364 sk->sk_prot->release_cb(sk);
2362 2365
2363 sk->sk_lock.owned = 0; 2366 sock_release_ownership(sk);
2364 if (waitqueue_active(&sk->sk_lock.wq)) 2367 if (waitqueue_active(&sk->sk_lock.wq))
2365 wake_up(&sk->sk_lock.wq); 2368 wake_up(&sk->sk_lock.wq);
2366 spin_unlock_bh(&sk->sk_lock.slock); 2369 spin_unlock_bh(&sk->sk_lock.slock);