aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2023-08-02 13:15:00 +0000
committerJakub Kicinski <[email protected]>2023-08-03 17:58:24 +0000
commitddf251fa2bc1d3699eec0bae6ed0bc373b8fda79 (patch)
tree88f728828a37d6926edc2343f1063e8220398a8f /rust/helpers.c
parenttcp_metrics: annotate data-races around tm->tcpm_net (diff)
downloadkernel-ddf251fa2bc1d3699eec0bae6ed0bc373b8fda79.tar.gz
kernel-ddf251fa2bc1d3699eec0bae6ed0bc373b8fda79.zip
tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
Whenever tcpm_new() reclaims an old entry, tcpm_suck_dst() would overwrite data that could be read from tcp_fastopen_cache_get() or tcp_metrics_fill_info(). We need to acquire fastopen_seqlock to maintain consistency. For newly allocated objects, tcpm_new() can switch to kzalloc() to avoid an extra fastopen_seqlock acquisition. Fixes: 1fe4c481ba63 ("net-tcp: Fast Open client - cookie cache") Signed-off-by: Eric Dumazet <[email protected]> Cc: Yuchung Cheng <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions