Re: [syzbot] Re: [PATCH net] tun: Remove nested call to bpf_net_ctx_set() in do_xdp_generic()
From: syzbot
Date: Thu Jul 25 2024 - 07:27:45 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: Re: [PATCH net] tun: Remove nested call to bpf_net_ctx_set() in do_xdp_generic()
Author: aha310510@xxxxxxxxx
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
net/core/dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6ea1d20676fb..a741000c81d8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5150,6 +5150,8 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff **pskb)
bpf_net_ctx_clear(bpf_net_ctx);
return XDP_DROP;
}
+
+ bpf_net_ctx_clear(bpf_net_ctx);
}
return XDP_PASS;
out_redir:
--