]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ice: add NULL check in eswitch lag check
authorDave Ertman <david.m.ertman@intel.com>
Thu, 22 May 2025 17:16:57 +0000 (13:16 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Jul 2025 20:01:15 +0000 (13:01 -0700)
commit3ce58b01ada408b372f15b7c992ed0519840e3cf
treeb2118687d242038fc22ee2f0ea918822c631eed5
parent24171a5a4a952c26568ff0d2a0bc8c4708a95e1d
ice: add NULL check in eswitch lag check

The function ice_lag_is_switchdev_running() is being called from outside of
the LAG event handler code.  This results in the lag->upper_netdev being
NULL sometimes.  To avoid a NULL-pointer dereference, there needs to be a
check before it is dereferenced.

Fixes: 776fe19953b0 ("ice: block default rule setting on LAG interface")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lag.c