summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDoug Berger <opendmb@gmail.com>2017-07-14 16:12:10 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-15 21:29:08 -0700
commitf48bed16a756f5bc0244acd581f61968f7d7c2a4 (patch)
tree5f8729e923872327c2a12f47a9f3693b7874aa88 /include
parent876dbadd53a7102e2a84afc84ea2bd3ee6dc5636 (diff)
downloadlinux-stable-f48bed16a756f5bc0244acd581f61968f7d7c2a4.tar.gz
linux-stable-f48bed16a756f5bc0244acd581f61968f7d7c2a4.tar.bz2
linux-stable-f48bed16a756f5bc0244acd581f61968f7d7c2a4.zip
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: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions