summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorNgai-Mint Kwan <ngai-mint.kwan@intel.com>2023-12-15 12:01:57 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-12-27 10:07:11 -0800
commit6d05ff55ef4f4954d28551236239f297bd52ea48 (patch)
treea3afe5f64246ecfe20fbcf492a468bd590d0cb05 /drivers/net/ethernet/intel/ice/ice_main.c
parent6a8d8bb55e7001de2d50920381cc858f3a3e9fb7 (diff)
ice: Shut down VSI with "link-down-on-close" enabled
Disabling netdev with ethtool private flag "link-down-on-close" enabled can cause NULL pointer dereference bug. Shut down VSI regardless of "link-down-on-close" state. Fixes: 8ac7132704f3 ("ice: Fix interface being down after reset with link-down-on-close flag on") Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 270d68b69c59..adfdea1e2805 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -9193,6 +9193,8 @@ int ice_stop(struct net_device *netdev)
else
netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
vsi->vsi_num, link_err);
+
+ ice_vsi_close(vsi);
return -EIO;
}
}