X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=net%2Ftipc%2Fsocket.c;h=dd73d71c02a99df7acd7ce3fb0d4a96d1778171d;hb=c47d122c5ba5f3b3371cfe051d770b5bbd591f6b;hp=37edfe10f8c6ffea553a54b24b9513bd2e18d694;hpb=eaba52d63bfcf0047ce3a1bb011b35d4f066df8e;p=linux-block.git diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 37edfe10f8c6..dd73d71c02a9 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -314,9 +314,9 @@ static void tsk_rej_rx_queue(struct sock *sk, int error) tipc_sk_respond(sk, skb, error); } -static bool tipc_sk_connected(struct sock *sk) +static bool tipc_sk_connected(const struct sock *sk) { - return sk->sk_state == TIPC_ESTABLISHED; + return READ_ONCE(sk->sk_state) == TIPC_ESTABLISHED; } /* tipc_sk_type_connectionless - check if the socket is datagram socket