]> git.baikalelectronics.ru Git - kernel.git/commit
net: annotate lockless accesses to sk->sk_pacing_shift
authorEric Dumazet <edumazet@google.com>
Tue, 17 Dec 2019 02:51:03 +0000 (18:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2019 06:09:52 +0000 (22:09 -0800)
commite6368ab546a3a1d54f782e6a283f293bfca1eafc
tree3e77528920733f3ed1238495a95c87f9f5d59ac9
parentb457b3447d0a7f761ff8890715be55451bbaa54a
net: annotate lockless accesses to sk->sk_pacing_shift

sk->sk_pacing_shift can be read and written without lock
synchronization. This patch adds annotations to
document this fact and avoid future syzbot complains.

This might also avoid unexpected false sharing
in sk_pacing_shift_update(), as the compiler
could remove the conditional check and always
write over sk->sk_pacing_shift :

if (sk->sk_pacing_shift != val)
sk->sk_pacing_shift = val;

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c
net/ipv4/tcp_bbr.c
net/ipv4/tcp_output.c