]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8f902338046b90a1dcfdd41bd85a07ce55d3ceee
treeb8e29ea210b3322e91e5de52a844a5681589ee89
parent55609f8618b1996d893bfd2d5afafabdd19e5dcc
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: 1da6ce98d30a (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