diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-09 23:51:20 +0200 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-10 06:34:31 +0200 |
commit | 60b173ca3d1cd1782bd0096dc17298ec242f6fb1 (patch) | |
tree | 63dcac48023790e1acfb33271d47d5d4132ca55c /drivers/xen | |
parent | net: avoid possible false sharing in sk_leave_memory_pressure() (diff) | |
download | linux-60b173ca3d1cd1782bd0096dc17298ec242f6fb1.tar.xz linux-60b173ca3d1cd1782bd0096dc17298ec242f6fb1.zip |
net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head
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>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/pvcalls-back.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index 69a626b0e594..c57c71b7d53d 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c @@ -775,7 +775,7 @@ static int pvcalls_back_poll(struct xenbus_device *dev, mappass->reqcopy = *req; icsk = inet_csk(mappass->sock->sk); queue = &icsk->icsk_accept_queue; - data = queue->rskq_accept_head != NULL; + data = READ_ONCE(queue->rskq_accept_head) != NULL; if (data) { mappass->reqcopy.cmd = 0; ret = 0; |