diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index dfa013283f47..2299a464c602 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2630,7 +2630,7 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk, static int unix_stream_read_skb(struct sock *sk, skb_read_actor_t recv_actor) { - if (unlikely(sk->sk_state != TCP_ESTABLISHED)) + if (unlikely(READ_ONCE(sk->sk_state) != TCP_ESTABLISHED)) return -ENOTCONN; return unix_read_skb(sk, recv_actor);