af_unix: Annotate data-race of sk->sk_state in unix_stream_read_skb().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 4 Jun 2024 16:52:34 +0000 (09:52 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Jun 2024 10:57:14 +0000 (12:57 +0200)
commitaf4c733b6b1aded4dc808fafece7dfe6e9d2ebb3
tree7c3c42ace6d46f7cce5604ea5bc3d651769b0435
parent8a34d4e8d9742a24f74998f45a6a98edd923319b
af_unix: Annotate data-race of sk->sk_state in unix_stream_read_skb().

unix_stream_read_skb() is called from sk->sk_data_ready() context
where unix_state_lock() is not held.

Let's use READ_ONCE() there.

Fixes: 77462de14a43 ("af_unix: Add read_sock for stream socket types")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/unix/af_unix.c