linux/drivers/net/ethernet
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
..
3com Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-29 15:32:13 -05:00
8390 Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
adaptec
adi
aeroflex
alteon
amd drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
apple
atheros Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
broadcom bnx2x: fix assignment of signed expression to unsigned variable 2013-03-24 17:27:28 -04:00
brocade
cadence Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-02-21 17:54:03 -08:00
calxeda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-01-29 15:32:13 -05:00
chelsio cxgb4: Allow for backward compatibility with new VPD scheme. 2013-03-12 05:33:12 -04:00
cirrus
cisco
davicom
dec ethernet/tulip: DE4x5 needs VIRT_TO_BUS 2013-03-17 12:01:10 -04:00
dlink
emulex be2net: use CSR-BAR SEMAPHORE reg for BE2/BE3 2013-03-06 14:57:17 -05:00
faraday
freescale fec: Fix the build as module 2013-03-20 14:45:30 -04:00
fujitsu Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
hp
i825xx Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
ibm net: ehea module param description fix 2013-02-18 12:26:36 -05:00
icplus
intel igb: Fix null pointer dereference 2013-03-26 03:00:32 -07:00
marvell mv643xx_eth: fix for disabled autoneg 2013-03-07 16:17:45 -05:00
mellanox net/mlx4_core: Disallow releasing VF QPs which have steering rules 2013-03-21 12:05:08 -04:00
micrel net: ks8851: convert to threaded IRQ 2013-01-29 13:32:00 -05:00
microchip Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
myricom ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
natsemi Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
neterion
nuvoton
nvidia
nxp lpc_eth: fix error return code in lpc_eth_drv_probe() 2013-03-20 12:19:15 -04:00
octeon
oki-semi
packetengines Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
pasemi net/pasemi: Fix missing coding style 2013-02-24 21:22:47 -05:00
qlogic hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
rdc ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
realtek r8169: honor jumbo settings when chipset is requested to start. 2013-02-28 15:37:29 -05:00
renesas sh_eth: check TSU registers ioremap() error 2013-03-20 12:17:59 -04:00
seeq Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sfc sfc: Only use TX push if a single descriptor is to be written 2013-03-12 17:07:56 +00:00
sgi
silan Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sis
smsc drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
stmicro Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
sun hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
tehuti
ti net: ethernet: cpsw: fix erroneous condition in error check 2013-03-21 11:57:42 -04:00
tile
toshiba
tundra
via Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-05 14:12:20 -05:00
wiznet
xilinx ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups 2013-02-04 13:22:33 -05:00
xircom
xscale
dnet.c
dnet.h
ethoc.c ethoc: Cleanup driver format 2013-01-29 14:07:05 -05:00
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c lantiq_etop: use free_netdev(netdev) instead of kfree() 2013-03-21 11:50:10 -04:00
Makefile
netx-eth.c
s6gmac.c