aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorSong Liu <[email protected]>2020-10-29 07:19:25 +0000
committerAlexei Starovoitov <[email protected]>2020-10-30 20:03:29 +0000
commit20b6cc34ea74b6a84599c1f8a70f3315b56a1883 (patch)
treed3a5f38e379c3a12c5592aeec15e1806e9a26403 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentbpf: Use separate lockdep class for each hashtab (diff)
downloadkernel-20b6cc34ea74b6a84599c1f8a70f3315b56a1883.tar.gz
kernel-20b6cc34ea74b6a84599c1f8a70f3315b56a1883.zip
bpf: Avoid hashtab deadlock with map_locked
If a hashtab is accessed in both non-NMI and NMI context, the system may deadlock on bucket->lock. Fix this issue with percpu counter map_locked. map_locked rejects concurrent access to the same bucket from the same CPU. To reduce memory overhead, map_locked is not added per bucket. Instead, 8 percpu counters are added to each hashtab. buckets are assigned to these counters based on the lower bits of its hash. Signed-off-by: Song Liu <[email protected]> Signed-off-by: Alexei Starovoitov <[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