af_xdp: workaround kernel race between poll() and sendmsg() 77/32277/6
authorBenoît Ganne <bganne@cisco.com>
Thu, 29 Apr 2021 16:24:24 +0000 (18:24 +0200)
committerDamjan Marion <dmarion@me.com>
Fri, 21 May 2021 19:50:14 +0000 (19:50 +0000)
commita42c41be4eed3e1ce2a42038b07ce1d3420891cd
treefc95c7c24cbef993cc2bef8742b3360123d70b66
parent92a8d761c412590f5112239be4c511091b2b2d5a
af_xdp: workaround kernel race between poll() and sendmsg()

Prior to Linux 5.6 there is a race condition between poll() and
sendmsg() in the kernel. This patch protects the syscalls with a lock
to prevent it, unless the NO_SYSCALL_LOCK flag is set at create time.
See
https://lore.kernel.org/bpf/BYAPR11MB365382C5DB1E5FCC53242609C1549@BYAPR11MB3653.namprd11.prod.outlook.com/

Type: fix

Change-Id: Ie7d4f5cb41f697b11a09b6046e54d190430d76df
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/af_xdp/af_xdp.api
src/plugins/af_xdp/af_xdp.h
src/plugins/af_xdp/af_xdp_doc.md
src/plugins/af_xdp/api.c
src/plugins/af_xdp/cli.c
src/plugins/af_xdp/device.c
src/plugins/af_xdp/input.c
src/plugins/af_xdp/output.c
src/plugins/af_xdp/test_api.c
src/plugins/af_xdp/unformat.c