Re: [PATCH] be2net: Remove potential access to the zero address

From: Jakub Kicinski
Date: Thu Apr 17 2025 - 22:55:06 EST


On Wed, 16 Apr 2025 13:32:29 +0200 Michal Swiatkowski wrote:
> > At the moment of calling the function be_cmd_get_mac_from_list() with the
> > following parameters:
> > be_cmd_get_mac_from_list(adapter, mac, &pmac_valid, NULL,
> > adapter->if_handle, 0);
>
> Looks like pmac_valid needs to be false to reach *pmac_id assign.

Right, it is for this caller and there is a check which skip this logic
if pmac_id_valid is false, line 3738.