[Intel-wired-lan] [next PATCH S94 02/13] i40e: Add setting pf->lan_vsi in a recovery mode init path

Alice Michael alice.michael at intel.com
Thu Aug 2 00:40:25 UTC 2018


From: Paweł Jabłoński <pawel.jablonski at intel.com>

This patch fixes the issue with shutdowning the system, after
entering the recovery mode. This is needed in the upgrade
scenario. Without this the driver tries to access an array out of
bounds.

Signed-off-by: Paweł Jabłoński <pawel.jablonski at intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c4ba44c..c9b1d0c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -13640,6 +13640,7 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)
 	v_idx = i40e_vsi_mem_alloc(pf, I40E_VSI_MAIN);
 	if (v_idx < 0)
 		goto err_switch_setup;
+	pf->lan_vsi = v_idx;
 	vsi = pf->vsi[v_idx];
 	if (!vsi)
 		goto err_switch_setup;
-- 
2.9.5



More information about the Intel-wired-lan mailing list