]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i40e: guard against vf message races
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 28 Nov 2013 06:39:30 +0000 (06:39 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 5 Jan 2014 06:37:57 +0000 (22:37 -0800)
commit6c1b5bff5a4f3c21724ce36d27942fb4d50ab36e
tree5ef810d3d597f444737e961d2a227d9970d07cae
parent0e2fe46ca7ae2beb068ea171cf181bb4e028eae1
i40e: guard against vf message races

When disabling and enabling VFs on a live system with the VF driver
loaded, it's possible to receive an admin queue message from the VF
driver at an inconvenient time, e.g. when the associated data structures
aren't present or configured. This causes a rather inconvenient panic.

To guard against this, we change the order of when we set num_alloc_vfs
when turning off SR-IOV, and then gate processing of any VF messages
based upon that value. Likewise, when enabling VFs, we shut off the
relevant interrupt until configuration is complete.

Change-Id: I0c172c056616c2bebd78bbc807ab446eb484deea
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c