]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40evf: Don't Panic
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 12 Apr 2016 15:30:41 +0000 (08:30 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 17:41:06 +0000 (10:41 -0700)
commit6b9adad94e9a360f14bebeafb6063ab85717df86
tree69e1c86d8737ccccb3193e2b19c3957e44b9f3e4
parentc227434cdb0ca5e6d3c38ab491dc4a2909696916
i40evf: Don't Panic

Orabug: 23176970

Under some circumstances the driver remove function may be called before
the driver is fully initialized. So we can't assume that we know where
our towel is at, or that all of the data structures are initialized.

To ensure that we don't panic, check that the vsi_res pointer is valid
before dereferencing it. Then drink beer and eat peanuts.

Change-ID: If697b4db57348e39f9538793e16aa755e3e1af03
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit c0913c2e431c86026acba667f8655d90979bb79c)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40evf/i40evf.h