]> www.infradead.org Git - users/hch/xfs.git/commit
af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 4 Jun 2024 16:52:41 +0000 (09:52 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Jun 2024 10:57:15 +0000 (12:57 +0200)
commitefaf24e30ec39ebbea9112227485805a48b0ceb1
tree42ca942ab931b6967d93e9183b4712b902993697
parent5d915e584d8408211d4567c22685aae8820bfc55
af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().

While dumping sockets via UNIX_DIAG, we do not hold unix_state_lock().

Let's use READ_ONCE() to read sk->sk_shutdown.

Fixes: e4e541a84863 ("sock-diag: Report shutdown for inet and unix sockets (v2)")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/unix/diag.c