On Fri, 13 Nov 2026 17:22:07 +0300
Bulatov Mark <[email protected]> wrote:

> From: Mark Bulatov <[email protected]>
> 
> If the search fails, it leads to a null pointer dereference when attempting
> to initialize nfp_mac_idx.
> 
> Fix this by adding a check.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: d3c33bdf1f ("net/nfp: prepare for IPv4 UDP tunnel decap flow action")
> Cc: [email protected]
> 
> Signed-off-by: Mark Bulatov <[email protected]>
> ---

AI review feedback

[PATCH] net/nfp: fix uninit local var in nfp_pre_tun_table_check_del

Error: find_entry is still uninitialized on one path.

  find_entry is only assigned inside the loop, and only for indexes
  where pre_tun_bitmap[i] != 0. If no bit is set, the loop never
  calls nfp_pre_tun_table_search() and the new NULL check reads an
  uninitialized pointer. The subject says "fix uninit local var" but
  the patch does not initialize anything. Initialize it:

        struct nfp_pre_tun_entry *find_entry = NULL;

  With that, the added check covers both the "nothing searched" and
  "nothing found" cases.

Warning: Fixes tag needs a 12 character hash:

        Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow 
action")

Reply via email to