]> www.infradead.org Git - users/hch/xfs.git/commit
af_unix: Annotate data-races around sk->sk_sndbuf.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 4 Jun 2024 16:52:36 +0000 (09:52 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Jun 2024 10:57:15 +0000 (12:57 +0200)
commitb0632e53e0da8054e36bc973f0eec69d30f1b7c6
tree55f9a3cbd54faf873a66fd7b5f973ce927433a98
parent0aa3be7b3e1f8f997312cc4705f8165e02806f8f
af_unix: Annotate data-races around sk->sk_sndbuf.

sk_setsockopt() changes sk->sk_sndbuf under lock_sock(), but it's
not used in af_unix.c.

Let's use READ_ONCE() to read sk->sk_sndbuf in unix_writable(),
unix_dgram_sendmsg(), and unix_stream_sendmsg().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/unix/af_unix.c