[dpdk-dev] [PATCH v2 3/4] net/i40e: do not use vsi until after NULL check in i40e_vsi_release

John W. Linville linville at tuxdriver.com
Thu Sep 29 19:39:35 CEST 2016


Coverity issue: 127556
Fixes: 440499cf5376 ("net/i40e: support floating VEB")

Signed-off-by: John W. Linville <linville at tuxdriver.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
v2: fix-up changelog entries based-on comments from Ferruh Yigit

 drivers/net/i40e/i40e_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b04c833b2e04..d1f0f762b04c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4097,11 +4097,13 @@ i40e_vsi_release(struct i40e_vsi *vsi)
 	void *temp;
 	int ret;
 	struct i40e_mac_filter *f;
-	uint16_t user_param = vsi->user_param;
+	uint16_t user_param;
 
 	if (!vsi)
 		return I40E_SUCCESS;
 
+	user_param = vsi->user_param;
+
 	pf = I40E_VSI_TO_PF(vsi);
 	hw = I40E_VSI_TO_HW(vsi);
 
-- 
2.7.4



More information about the dev mailing list