diff options
author | Breno Leitao <[email protected]> | 2024-09-12 08:56:19 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-09-13 19:49:45 -0700 |
commit | 157f29152b61ca41809dd7ead29f5733adeced19 (patch) | |
tree | 91279a0e75d57f5fedab63a89c872e78b7033018 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 4144a1059b47e821c82c3c82eb23a4c7312dce3a (diff) |
netkit: Assign missing bpf_net_context
During the introduction of struct bpf_net_context handling for
XDP-redirect, the netkit driver has been missed, which also requires it
because NETKIT_REDIRECT invokes skb_do_redirect() which is accessing the
per-CPU variables. Otherwise we see the following crash:
BUG: kernel NULL pointer dereference, address: 0000000000000038
bpf_redirect()
netkit_xmit()
dev_hard_start_xmit()
Set the bpf_net_context before invoking netkit_xmit() program within the
netkit driver.
Fixes: 401cb7dae813 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
Signed-off-by: Breno Leitao <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
Reviewed-by: Toke Høiland-Jørgensen <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions