hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
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