mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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: fff1f3001c ("tcp: add a spinlock to protect struct request_sock_queue")
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
parent
503978aca4
commit
60b173ca3d
3 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue