diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-06-04 19:52:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-21 15:38:19 +0300 |
commit | 484e036e1a2c1851c3159c4983b29116acc2624b (patch) | |
tree | 1aa1de204cd7f22acae50fa18ed9b302cf3f3754 /LICENSES | |
parent | 4e38d6c04943a52ee8f8cc87bb0e9040647a35fb (diff) | |
download | linux-484e036e1a2c1851c3159c4983b29116acc2624b.tar.xz |
af_unix: Annotate data-races around sk->sk_state in unix_write_space() and poll().
[ Upstream commit eb0718fb3e97ad0d6f4529b810103451c90adf94 ]
unix_poll() and unix_dgram_poll() read sk->sk_state locklessly and
calls unix_writable() which also reads sk->sk_state without holding
unix_state_lock().
Let's use READ_ONCE() in unix_poll() and unix_dgram_poll() and pass
it to unix_writable().
While at it, we remove TCP_SYN_SENT check in unix_dgram_poll() as
that state does not exist for AF_UNIX socket since the code was added.
Fixes: 1586a5877db9 ("af_unix: do not report POLLOUT on listeners")
Fixes: 3c73419c09a5 ("af_unix: fix 'poll for write'/ connected DGRAM sockets")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions