kernel_optimize_test/samples
Magnus Karlsson 81ef603e86 samples/bpf: Fix possible hang in xdpsock with multiple threads
[ Upstream commit 092fde0f863b72b67c4d6dc03844f5658fc00a35 ]

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: cd9e72b6f2 ("samples/bpf: xdpsock: Add option to specify batch size")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20201210163407.22066-1-magnus.karlsson@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:49 +01:00
..
auxdisplay
binderfs
bpf samples/bpf: Fix possible hang in xdpsock with multiple threads 2020-12-30 11:53:49 +01:00
configfs
connector
ftrace samples/ftrace: Mark my_tramp[12]? global 2020-11-30 21:42:48 -05:00
hidraw
hw_breakpoint
kdb
kfifo
kmemleak
kobject
kprobes
livepatch
mei
nitro_enclaves
pidfd
pktgen
qmi
rpmsg
seccomp
timers
trace_events
trace_printk
uhid
v4l
vfio-mdev
vfs
watch_queue
watchdog
Kconfig
Makefile