aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorLorenz Bauer <[email protected]>2020-10-12 09:18:50 +0000
committerDaniel Borkmann <[email protected]>2020-10-15 18:49:56 +0000
commitf58423aeab28f861b67933206f322f764f05787d (patch)
treeeb606d94e8041a53fea006c6db698f0d1788c1b3 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentbpf: Fix register equivalence tracking. (diff)
downloadkernel-f58423aeab28f861b67933206f322f764f05787d.tar.gz
kernel-f58423aeab28f861b67933206f322f764f05787d.zip
bpf, sockmap: Add locking annotations to iterator
The sparse checker currently outputs the following warnings: include/linux/rcupdate.h:632:9: sparse: sparse: context imbalance in 'sock_hash_seq_start' - wrong count at exit include/linux/rcupdate.h:632:9: sparse: sparse: context imbalance in 'sock_map_seq_start' - wrong count at exit Add the necessary __acquires and __release annotations to make the iterator locking schema palatable to sparse. Also add __must_hold for good measure. The kernel codebase uses both __acquires(rcu) and __acquires(RCU). I couldn't find any guidance which one is preferred, so I used what is easier to type out. Fixes: 0365351524d7 ("net: Allow iterating sockmap and sockhash") Reported-by: kernel test robot <[email protected]> Signed-off-by: Lorenz Bauer <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: John Fastabend <[email protected]> Acked-by: Jakub Sitnicki <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions