net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.
authorNicolas Schichan <nschichan@freebox.fr>
Tue, 26 Jan 2016 15:12:35 +0000 (16:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Jan 2016 00:08:01 +0000 (16:08 -0800)
commit3b89624ab54b9dc2d92fc08ce2670e5f19ad8ec8
treeb8e29ea210b3322e91e5de52a844a5681589ee89
parent6ed742363b9c3d1d038f013591d57a606ae2c261
net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.

The code in txq_put_data() would use txq->tx_curr_desc to index the
tso_hdrs/tso_hdrs_dma buffers, for less than 8 bytes unaligned
fragments, which is already moved to the next descriptor at the
beginning of the function.

If that fragment was the last of the the skb, the next skb would use
that same space to place the ip headers, overwritting that small
fragment data.

Fixes: 91986fd3d335 (net: mv643xx_eth: Ensure proper data alignment in TSO TX path)
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Reviewed-by: Philipp Kirchhofer <philipp@familie-kirchhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mv643xx_eth.c