aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/global_data_init.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2022-08-30 23:19:53 +0000
committerDaniel Borkmann <[email protected]>2022-08-31 20:22:29 +0000
commit197072945a708d62181895409effdfcda80c7798 (patch)
treeec9c9a9ecaa2b308aec7cd238ce61b157658dab4 /tools/testing/selftests/bpf/prog_tests/global_data_init.c
parentbpf, net: Avoid loading module when calling bpf_setsockopt(TCP_CONGESTION) (diff)
downloadkernel-197072945a708d62181895409effdfcda80c7798.tar.gz
kernel-197072945a708d62181895409effdfcda80c7798.zip
selftest/bpf: Ensure no module loading in bpf_setsockopt(TCP_CONGESTION)
This patch adds a test to ensure bpf_setsockopt(TCP_CONGESTION, "not_exist") will not trigger the kernel module autoload. Before the fix: [ 40.535829] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 [...] [ 40.552134] tcp_ca_find_autoload.constprop.0+0xcb/0x200 [ 40.552689] tcp_set_congestion_control+0x99/0x7b0 [ 40.553203] do_tcp_setsockopt+0x3ed/0x2240 [...] [ 40.556041] __bpf_setsockopt+0x124/0x640 Signed-off-by: Martin KaFai Lau <[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/global_data_init.c')
0 files changed, 0 insertions, 0 deletions