[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cf0b25f-2b7f-478e-af14-b0ebd5905a79@blackwall.org>
Date: Fri, 13 Sep 2024 12:15:30 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Breno Leitao <leitao@...ian.org>, kuba@...nel.org, bpf@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: vadim.fedorenko@...ux.dev, andrii@...nel.org,
"open list:BPF [NETKIT] (BPF-programmable network device)"
<netdev@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] netkit: Assign missing bpf_net_context
On 9/12/24 18:56, Breno Leitao wrote:
> 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 <leitao@...ian.org>
> Acked-by: Daniel Borkmann <daniel@...earbox.net>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> drivers/net/netkit.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>
Powered by blists - more mailing lists