linux-stable/net/unix
Kuniyuki Iwashima d8011254e9 af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
[ Upstream commit efaf24e30e ]

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

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

Fixes: e4e541a848 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-21 14:38:20 +02:00
..
af_unix.c af_unix: Use skb_queue_empty_lockless() in unix_release_sock(). 2024-06-21 14:38:20 +02:00
diag.c af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill(). 2024-06-21 14:38:20 +02:00
garbage.c af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc(). 2024-05-02 16:32:40 +02:00
Kconfig af_unix: Kconfig: make CONFIG_UNIX bool 2023-06-12 10:45:50 +01:00
Makefile af_unix: Implement ->psock_update_sk_prot() 2021-07-15 18:17:50 -07:00
scm.c af_unix: Do not use atomic ops for unix_sk(sk)->inflight. 2024-04-17 11:19:32 +02:00
scm.h net: split out functions related to registering inflight socket files 2019-02-28 08:24:23 -07:00
sysctl_net_unix.c networking: Update to register_net_sysctl_sz 2023-08-15 15:26:18 -07:00
unix_bpf.c bpf: sockmap, fix proto update hook to avoid dup calls 2024-01-25 15:35:30 -08:00