linux-stable/drivers/net/ethernet/broadcom
Florian Fainelli 914adb55af net: systemport: do not crash freeing an unitialized TX ring
Callers of bcm_sysport_init_tx_ring() can currently fail, and will
always call bcm_sysport_fini_tx_ring() in a loop ending at the number of
TX queues (32) without checking if the TX ring was successfully
initialized or not.

Update bcm_sysport_fini_tx_ring() to return early and avoid a crash
de-referencing ring->cbs if the TX ring was not initialized, since
ring->cbs is the last part of the initialization done by
bcm_sysport_init_tx_ring() that could fail.

Fixes: 80105befdb ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-01 15:13:56 -04:00
..
bnx2x bnx2x: Add a fallback multi-function mode NPAR1.5 2014-09-19 16:31:08 -04:00
genet net: bcmgenet: avoid unbalanced enable_irq_wake calls 2014-10-10 15:39:15 -04:00
b44.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-23 12:09:27 -04:00
b44.h
bcm63xx_enet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
bcm63xx_enet.h
bcmsysport.c net: systemport: do not crash freeing an unitialized TX ring 2014-11-01 15:13:56 -04:00
bcmsysport.h net: systemport: add Wake-on-LAN support 2014-07-07 20:56:47 -07:00
bgmac.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
bgmac.h
bnx2.c bnx2: Correctly receive full sized 802.1ad fragmes 2014-10-01 16:43:45 -04:00
bnx2.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
bnx2_fw.h bnx2: Rebranding bnx2 driver. 2014-06-25 16:27:27 -07:00
cnic.c cnic: Update the rcu_access_pointer() usages 2014-10-29 15:07:28 -04:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-07 21:41:53 -07:00
Makefile net: systemport: hook SYSTEMPORT driver in the build 2014-04-26 12:57:40 -04:00
sb1250-mac.c
tg3.c tg3: Add skb->xmit_more support 2014-10-14 15:59:37 -04:00
tg3.h tg3: prevent ifup/ifdown during PCI error recovery 2014-09-02 13:02:19 -07:00