]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Check and set the PF driver state first in i40e_ndo_set_vf_mac
authorLihong Yang <lihong.yang@intel.com>
Wed, 5 Jun 2019 19:45:16 +0000 (12:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2019 23:53:25 +0000 (16:53 -0700)
commit2124634930069bafd12abd83dc131a50ae11ab84
tree1ae1ea308582392d5ea3cac3b7bba9b680ff2f64
parent5d13de9e8fc15ceb70fa870631619a1e304ff133
i40e: Check and set the PF driver state first in i40e_ndo_set_vf_mac

The PF driver state flag __I40E_VIRTCHNL_OP_PENDING needs to be
checked and set at the beginning of i40e_ndo_set_vf_mac. Otherwise,
if there are error conditions before it, the flag will be cleared
unexpectedly by this function to cause potential race conditions.
Hence move the check to the top of this function.

Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c