[linux] 02/02: [armel, armhf] net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Feb 18 16:46:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux.
commit c232b093cb2e3c1640c3f7ab3a5ff630963236ea
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Thu Feb 18 16:45:54 2016 +0000
[armel,armhf] net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.
This looks like it fixes #814681.
---
debian/changelog | 2 ++
..._eth-fix-packet-corruption-with-tso-and-t.patch | 41 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 44 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8ca5a5b..62894d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ linux (4.4.2-2) UNRELEASED; urgency=medium
* udeb: Make DAC960 and cciss optional in scsi-modules again
(fixes FTBFS on armhf, arm64)
+ * [armel,armhf] net: mv643xx_eth: fix packet corruption with TSO and tiny
+ unaligned packets. (Closes: #814681)
-- Ben Hutchings <ben at decadent.org.uk> Thu, 18 Feb 2016 16:43:30 +0000
diff --git a/debian/patches/bugfix/arm/net-mv643xx_eth-fix-packet-corruption-with-tso-and-t.patch b/debian/patches/bugfix/arm/net-mv643xx_eth-fix-packet-corruption-with-tso-and-t.patch
new file mode 100644
index 0000000..5ccf75a
--- /dev/null
+++ b/debian/patches/bugfix/arm/net-mv643xx_eth-fix-packet-corruption-with-tso-and-t.patch
@@ -0,0 +1,41 @@
+From: Nicolas Schichan <nschichan at freebox.fr>
+Date: Tue, 26 Jan 2016 16:12:35 +0100
+Subject: net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned
+ packets.
+Origin: https://git.kernel.org/linus/3b89624ab54b9dc2d92fc08ce2670e5f19ad8ec8
+Bug-Debian: https://bugs.debian.org/814681
+
+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 at freebox.fr>
+Reviewed-by: Philipp Kirchhofer <philipp at familie-kirchhofer.de>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
+index a0c03834a2f7..55831188bc32 100644
+--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
++++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
+@@ -762,10 +762,10 @@ txq_put_data_tso(struct net_device *dev, struct tx_queue *txq,
+
+ if (length <= 8 && (uintptr_t)data & 0x7) {
+ /* Copy unaligned small data fragment to TSO header data area */
+- memcpy(txq->tso_hdrs + txq->tx_curr_desc * TSO_HEADER_SIZE,
++ memcpy(txq->tso_hdrs + tx_index * TSO_HEADER_SIZE,
+ data, length);
+ desc->buf_ptr = txq->tso_hdrs_dma
+- + txq->tx_curr_desc * TSO_HEADER_SIZE;
++ + tx_index * TSO_HEADER_SIZE;
+ } else {
+ /* Alignment is okay, map buffer and hand off to hardware */
+ txq->tx_desc_mapping[tx_index] = DESC_DMA_MAP_SINGLE;
diff --git a/debian/patches/series b/debian/patches/series
index 6d47798..ec1bad3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -129,3 +129,4 @@ bugfix/x86/x86-efi-setup-separate-efi-page-tables-in-kexec-path.patch
bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch
debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch
+bugfix/arm/net-mv643xx_eth-fix-packet-corruption-with-tso-and-t.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list