diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2021-07-01 05:02:37 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-07-01 05:02:37 +0300 |
commit | c503c193db7d7ccc0c58b1ef694eaef331318149 (patch) | |
tree | 44d3215196f385e88fa5da6affc58649c90e0ea9 /net/unix/af_unix.c | |
parent | 9821a195d4e263801884b105554e801642c59f2a (diff) | |
parent | 1eb5dde674f57b1a1918dab33f09e35cdd64eb07 (diff) | |
download | linux-c503c193db7d7ccc0c58b1ef694eaef331318149.tar.xz |
Merge branch 'cpufreq/cppc-fie' into cpufreq/arm/linux-next
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5a31307ceb76..5d1192ceb139 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -535,12 +535,14 @@ static void unix_release_sock(struct sock *sk, int embrion) u->path.mnt = NULL; state = sk->sk_state; sk->sk_state = TCP_CLOSE; + + skpair = unix_peer(sk); + unix_peer(sk) = NULL; + unix_state_unlock(sk); wake_up_interruptible_all(&u->peer_wait); - skpair = unix_peer(sk); - if (skpair != NULL) { if (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) { unix_state_lock(skpair); @@ -555,7 +557,6 @@ static void unix_release_sock(struct sock *sk, int embrion) unix_dgram_peer_wake_disconnect(sk, skpair); sock_put(skpair); /* It may now die */ - unix_peer(sk) = NULL; } /* Try to flush out this socket. Throw out buffers at least */ |