]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: annotate data-race around tcp_md5sig_pool_populated
authorEric Dumazet <edumazet@google.com>
Mon, 22 Aug 2022 21:15:28 +0000 (21:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 11:59:18 +0000 (12:59 +0100)
commitcd696e8a6f7323f82ea2db0aa7261164ba482bf0
treeb8e1bbe8a078cbabf46f376446e4a3906638e694
parentc7dc1e2fbdfb8d70f7d4607028d0203362ea734e
tcp: annotate data-race around tcp_md5sig_pool_populated

tcp_md5sig_pool_populated can be read while another thread
changes its value.

The race has no consequence because allocations
are protected with tcp_md5sig_mutex.

This patch adds READ_ONCE() and WRITE_ONCE() to document
the race and silence KCSAN.

Reported-by: Abhishek Shah <abhishek.shah@columbia.edu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c