linux/drivers/net/ethernet/intel/igb
Alex Williamson d0f63acc2f igb: Fix null pointer dereference
The max_vfs= option has always been self limiting to the number of VFs
supported by the device.  fa44f2f1 added SR-IOV configuration via
sysfs, but in the process broke this self correction factor.  The
failing path is:

igb_probe
  igb_sw_init
    if (max_vfs > 7) {
        adapter->vfs_allocated_count = 7;
    ...
    igb_probe_vfs
    igb_enable_sriov(, max_vfs)
      if (num_vfs > 7) {
        err = -EPERM;
        ...

This leaves vfs_allocated_count = 7 and vf_data = NULL, so we bomb out
when igb_probe finally calls igb_reset.  It seems like a really bad
idea, and somewhat pointless, to set vfs_allocated_count separate from
vf_data, but limiting max_vfs is enough to avoid the null pointer.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-03-26 03:00:32 -07:00
..
e1000_82575.c igb: fix i350 anti spoofing config 2013-03-26 02:47:50 -07:00
e1000_82575.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_defines.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_hw.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_i210.c igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_i210.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_mac.c igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_mac.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_mbx.c igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_mbx.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_nvm.c igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_nvm.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_phy.c igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_phy.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
e1000_regs.h igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00
igb.h igb: Fix for lockdep issue in igb_get_i2c_client 2013-03-05 01:25:27 -08:00
igb_ethtool.c igb: increase timeout for ethtool offline self-test 2013-02-15 21:46:54 -08:00
igb_hwmon.c igb: Fix for lockdep issue in igb_get_i2c_client 2013-03-05 01:25:27 -08:00
igb_main.c igb: Fix null pointer dereference 2013-03-26 03:00:32 -07:00
igb_ptp.c igb: Use in-kernel PTP_EV_PORT #define 2013-01-18 06:52:22 -08:00
Makefile igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00