summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-06-07 17:36:15 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-06-08 16:00:42 +0200
commit1f2436229bf64ac040f2f5018df059c21fc5526a (patch)
tree9b3c95033f3b723e5ff83c3c47023b1406e33e61 /net/ipv4
parente7ed83d6fa1a00d0f2ad0327e73d3ea9e7ea8de1 (diff)
downloadlinux-stable-1f2436229bf64ac040f2f5018df059c21fc5526a.tar.gz
linux-stable-1f2436229bf64ac040f2f5018df059c21fc5526a.tar.bz2
linux-stable-1f2436229bf64ac040f2f5018df059c21fc5526a.zip
selftests/bpf: Fix ringbuf selftest sample counting undeterminism
Fix test race, in which background poll can get either 5 or 6 samples, depending on timing of notification. Prevent this by open-coding sample triggering and forcing notification for the very last sample only. Also switch to using atomic increments and exchanges for more obviously reliable counting and checking. Additionally, check expected processed sample counters for single-threaded use cases as well. Fixes: 9a5f25ad30e5 ("selftests/bpf: Fix sample_cnt shared between two threads") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200608003615.3549991-1-andriin@fb.com
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions