From: Greg Kroah-Hartman Date: Thu, 4 May 2006 05:21:36 +0000 (-0700) Subject: added another patch to the queue X-Git-Tag: v2.6.16.14~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a23a2482b36e13e059899ac7b8a0c3b85ef2a1b4;p=thirdparty%2Fkernel%2Fstable-queue.git added another patch to the queue --- diff --git a/queue-2.6.16/md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch b/queue-2.6.16/md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch index ec1bcdc834c..86f0214a865 100644 --- a/queue-2.6.16/md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch +++ b/queue-2.6.16/md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch @@ -20,8 +20,8 @@ Signed-off-by: Greg Kroah-Hartman drivers/md/raid10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- linux-2.6.16.12.orig/drivers/md/raid10.c -+++ linux-2.6.16.12/drivers/md/raid10.c +--- linux-2.6.16.13.orig/drivers/md/raid10.c ++++ linux-2.6.16.13/drivers/md/raid10.c @@ -1436,9 +1436,9 @@ static void raid10d(mddev_t *mddev) sl--; d = r10_bio->devs[sl].devnum; diff --git a/queue-2.6.16/series b/queue-2.6.16/series index e39cfde0d02..0684c1b31a2 100644 --- a/queue-2.6.16/series +++ b/queue-2.6.16/series @@ -1 +1,2 @@ md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch +via-rhine-zero-pad-short-packets-on-rhine-i-ethernet-cards.patch diff --git a/queue-2.6.16/via-rhine-zero-pad-short-packets-on-rhine-i-ethernet-cards.patch b/queue-2.6.16/via-rhine-zero-pad-short-packets-on-rhine-i-ethernet-cards.patch new file mode 100644 index 00000000000..ee99082c233 --- /dev/null +++ b/queue-2.6.16/via-rhine-zero-pad-short-packets-on-rhine-i-ethernet-cards.patch @@ -0,0 +1,69 @@ +From git-commits-head-owner@vger.kernel.org Tue May 2 12:59:58 2006 +Date: Tue, 2 May 2006 19:59:21 GMT +Message-Id: <200605021959.k42JxLiZ015749@hera.kernel.org> +From: Linux Kernel Mailing List +To: git-commits-head@vger.kernel.org +Subject: [PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards + +From: Craig Brind + +[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards + +Fixes Rhine I cards disclosing fragments of previously transmitted frames +in new transmissions. + +Before transmission, any socket buffer (skb) shorter than the ethernet +minimum length of 60 bytes was zero-padded. On Rhine I cards the data can +later be copied into an aligned transmission buffer without copying this +padding. This resulted in the transmission of the frame with the extra +bytes beyond the provided content leaking the previous contents of this +buffer on to the network. + +Now zero-padding is repeated in the local aligned buffer if one is used. + +Following a suggestion from the via-rhine maintainer, no attempt is made +here to avoid the duplicated effort of padding the skb if it is known that +an aligned buffer will definitely be used. This is to make the change +"obviously correct" and allow it to be applied to a stable kernel if +necessary. There is no change to the flow of control and the changes are +only to the Rhine I code path. + +The patch has run on an in-service Rhine-I host without incident. Frames +shorter than 60 bytes are now correctly zero-padded when captured on a +separate host. I see no unusual stats reported by ifconfig, and no unusual +log messages. + +Signed-off-by: Craig Brind +Signed-off-by: Roger Luethi +Cc: Jeff Garzik +Signed-off-by: Andrew Morton +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/via-rhine.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- linux-2.6.16.13.orig/drivers/net/via-rhine.c ++++ linux-2.6.16.13/drivers/net/via-rhine.c +@@ -129,6 +129,7 @@ + - Massive clean-up + - Rewrite PHY, media handling (remove options, full_duplex, backoff) + - Fix Tx engine race for good ++ - Craig Brind: Zero padded aligned buffers for short packets. + + */ + +@@ -1306,7 +1307,12 @@ static int rhine_start_tx(struct sk_buff + rp->stats.tx_dropped++; + return 0; + } ++ ++ /* Padding is not copied and so must be redone. */ + skb_copy_and_csum_dev(skb, rp->tx_buf[entry]); ++ if (skb->len < ETH_ZLEN) ++ memset(rp->tx_buf[entry] + skb->len, 0, ++ ETH_ZLEN - skb->len); + rp->tx_skbuff_dma[entry] = 0; + rp->tx_ring[entry].addr = cpu_to_le32(rp->tx_bufs_dma + + (rp->tx_buf[entry] -