]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head
authorEric Dumazet <edumazet@google.com>
Wed, 9 Oct 2019 21:51:20 +0000 (14:51 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitc85ce3effbab9e92dac272879d6e3e6be17490b3
tree085aff6e811a6a2acabf8d8b82d2fd9974baeb8d
parent62619bf2600f47441ee3808bb15d00622da83c0a
net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 60b173ca3d1cd1782bd0096dc17298ec242f6fb1 ]

reqsk_queue_empty() is called from inet_csk_listen_poll() while
other cpus might write ->rskq_accept_head value.

Use {READ|WRITE}_ONCE() to avoid compiler tricks
and potential KCSAN splats.

Fixes: fff1f3001cc5 ("tcp: add a spinlock to protect struct request_sock_queue")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/xen/pvcalls-back.c
include/net/request_sock.h
net/ipv4/inet_connection_sock.c