aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/module_attach.c
diff options
context:
space:
mode:
authorMagnus Karlsson <[email protected]>2020-12-10 16:34:07 +0000
committerDaniel Borkmann <[email protected]>2020-12-10 22:13:43 +0000
commit092fde0f863b72b67c4d6dc03844f5658fc00a35 (patch)
tree5a20111f66b94fd0aa33b22bbc7d59104cdb77c3 /tools/testing/selftests/bpf/prog_tests/module_attach.c
parentselftests/bpf: Make selftest compilation work on clang 11 (diff)
downloadkernel-092fde0f863b72b67c4d6dc03844f5658fc00a35.tar.gz
kernel-092fde0f863b72b67c4d6dc03844f5658fc00a35.zip
samples/bpf: Fix possible hang in xdpsock with multiple threads
Fix a possible hang in xdpsock that can occur when using multiple threads. In this case, one or more of the threads might get stuck in the while-loop in tx_only after the user has signaled the main thread to stop execution. In this case, no more Tx packets will be sent, so a thread might get stuck in the aforementioned while-loop. Fix this by introducing a test inside the while-loop to check if the benchmark has been terminated. If so, return from the function. Fixes: cd9e72b6f210 ("samples/bpf: xdpsock: Add option to specify batch size") Signed-off-by: Magnus Karlsson <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/module_attach.c')
0 files changed, 0 insertions, 0 deletions