linux/drivers/net/ethernet/broadcom
Doug Berger f48bed16a7 net: bcmgenet: Free skb after last Tx frag
Since the skb is attached to the first control block of a fragmented
skb it is possible that the skb could be freed when reclaiming that
control block before all fragments of the skb have been consumed by
the hardware and unmapped.

This commit introduces first_cb and last_cb pointers to the skb
control block used by the driver to keep track of which transmit
control blocks within a transmit ring are the first and last ones
associated with the skb.

It then splits the bcmgenet_free_cb() function into transmit
(bcmgenet_free_tx_cb) and receive (bcmgenet_free_rx_cb) versions
that can handle the unmapping of dma mapped memory and cleaning up
the corresponding control block structure so that the skb is only
freed after the last associated transmit control block is reclaimed.

Fixes: 1c1008c793 ("net: bcmgenet: add main driver file")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-15 21:29:08 -07:00
..
bnx2x bnx2x: fix format overflow warning 2017-07-14 09:03:11 -07:00
bnxt bnxt_en: Fix SRIOV on big-endian architecture. 2017-07-11 10:32:11 -07:00
genet net: bcmgenet: Free skb after last Tx frag 2017-07-15 21:29:08 -07:00
Kconfig tg3: Add the ability to conditionally build w/ HWMON 2017-03-09 13:03:00 -08:00
Makefile net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
b44.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
b44.h net: ethernet: broadcom: b44: use phydev from struct net_device 2016-09-19 21:39:11 -04:00
bcm63xx_enet.c networking: use skb_put_zero() 2017-06-13 13:54:03 -04:00
bcm63xx_enet.h net: ethernet: broadcom: bcm63xx: use phydev from struct net_device 2016-09-19 21:39:12 -04:00
bcmsysport.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
bcmsysport.h net: systemport: Track per TX ring statistics 2017-03-24 12:53:14 -07:00
bgmac-bcma-mdio.c net: bgmac: use PHY subsystem for initializing PHY 2017-01-31 13:44:49 -05:00
bgmac-bcma.c net: ethernet: bgmac: Allow MAC address to be specified in DTB 2017-03-16 11:57:26 -07:00
bgmac-platform.c net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bgmac.c net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bgmac.h net: ethernet: bgmac: Make IDM register space optional 2017-07-15 14:28:27 -07:00
bnx2.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
bnx2.h ethernet/broadcom: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
cnic.c net-next: treewide use is_vlan_dev() helper function. 2017-02-06 16:33:29 -05:00
cnic.h
cnic_defs.h
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
sb1250-mac.c NET: sb1250-mac: Add missing MODULE_LICENSE() 2017-04-21 03:22:49 +02:00
tg3.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
tg3.h mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00