i40e: acquire VSI pointer only after VF is initialized
authorStefan Assmann <sassmann@kpanic.de>
Mon, 30 Nov 2020 13:12:57 +0000 (14:12 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 26 Jan 2021 18:44:17 +0000 (10:44 -0800)
commit67a3c6b3cc40bb217c3ff947a55053151a00fea0
tree725a1f35e0c37d819611791b958ca83d0f02a73c
parentf3fe97f64384fa4073d9dc0278c4b351c92e295c
i40e: acquire VSI pointer only after VF is initialized

This change simplifies the VF initialization check and also minimizes
the delay between acquiring the VSI pointer and using it. As known by
the commit being fixed, there is a risk of the VSI pointer getting
changed. Therefore minimize the delay between getting and using the
pointer.

Fixes: 9889707b06ac ("i40e: Fix crash caused by stress setting of VF MAC addresses")
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c