]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: net: netfilter: drop dead NULL checks
authorPuranjay Mohan <puranjay@kernel.org>
Fri, 2 Jan 2026 18:00:29 +0000 (10:00 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 2 Jan 2026 20:04:28 +0000 (12:04 -0800)
commitbddaf9adda72447061a52b328c2d4c64b327fa30
tree63a2fe037fafb399c4ad5c5a771f0af3e6479551
parent7646c7afd9a95db0b0cb4ad066ed90f6024da67d
bpf: net: netfilter: drop dead NULL checks

bpf_xdp_ct_lookup() and bpf_skb_ct_lookup() receive bpf_tuple and opts
parameter that are expected to be not NULL for real usages (see doc
string above functions). They return an error if NULL is passed for opts
or tuple.

The verifier will now reject programs that pass NULL to these
parameters, the kfuns can assume that these are always valid pointer, so
drop the NULL checks for these parameters.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102180038.2708325-4-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/netfilter/nf_conntrack_bpf.c