hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/net/tipc/socket.c
....@@ -300,9 +300,9 @@
300300 tipc_sk_respond(sk, skb, error);
301301 }
302302
303
-static bool tipc_sk_connected(struct sock *sk)
303
+static bool tipc_sk_connected(const struct sock *sk)
304304 {
305
- return sk->sk_state == TIPC_ESTABLISHED;
305
+ return READ_ONCE(sk->sk_state) == TIPC_ESTABLISHED;
306306 }
307307
308308 /* tipc_sk_type_connectionless - check if the socket is datagram socket