On Wed, Oct 25, 2023 at 08:41:24AM -0500, Yan Zhai wrote: > Hi Dan, > > On Wed, Oct 25, 2023 at 2:40 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > > > Hello Yan Zhai, > > > > The patch 29b22badb7a8: "lwt: Fix return values of BPF xmit ops" from > > Aug 17, 2023 (linux-next), leads to the following Smatch static > > checker warning: > > > > net/core/lwt_bpf.c:131 bpf_input() > > error: double free of 'skb' > > > Thanks for reporting. I looked at the code, and it is possible to > continue processing skb on bpf_input and bpf_output when BPF_REDIRECT > is returned. However, both paths call run_lwt_bpf with NO_REDIRECT as > can_redirect bool arg, which means the skb_do_redirect branch won't > trigger. So it does not look like a bug to me. The life-cycle of skb > is a bit messy around this corner though. > Ah, yeah. I see that now. Thanks for taking a look at this. regards, dan carpenter