From: Ngai-Mint Kwan <ngai-mint.k...@intel.com>

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.kits...@intel.com>
Signed-off-by: Ngai-Mint Kwan <ngai-mint.k...@intel.com>
Signed-off-by: Wojciech Drewek <wojciech.dre...@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c 
b/drivers/net/ethernet/intel/ice/ice_main.c
index 67c2ed2e61f9..a56fbc39e7fd 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -9301,6 +9301,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;
                }
        }
-- 
2.40.1

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to