From: Rudmer van Dijk <rudmer@legolas.dynup.net>
To: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.55 fix etherleak in 8390.c
Date: Fri, 10 Jan 2003 16:29:55 +0100 [thread overview]
Message-ID: <200301101626.44204@gandalf> (raw)
Hi,
this is the fix which went in 2.4.21-pre3-ac2, rediffed against 2.5.55
Rudmer
--- linux-2.5.55/drivers/net/8390.c.orig 2003-01-10 16:23:44.000000000 +0100
+++ linux-2.5.55/drivers/net/8390.c 2003-01-10 16:23:00.000000000 +0100
@@ -270,6 +270,7 @@
struct ei_device *ei_local = (struct ei_device *) dev->priv;
int length, send_length, output_page;
unsigned long flags;
+ char scratch[ETH_ZLEN];
length = skb->len;
@@ -341,7 +342,15 @@
* trigger the send later, upon receiving a Tx done interrupt.
*/
- ei_block_output(dev, length, skb->data, output_page);
+ if (length == send_length)
+ ei_block_output(dev, length, skb->data, output_page);
+ else
+ {
+ memset(scratch, 0, ETH_ZLEN);
+ memcpy(scratch, skb->data, skb->len);
+ ei_block_output(dev, ETH_ZLEN, scratch, output_page);
+ }
+
if (! ei_local->txing)
{
ei_local->txing = 1;
@@ -373,7 +382,14 @@
* reasonable hardware if you only use one Tx buffer.
*/
- ei_block_output(dev, length, skb->data, ei_local->tx_start_page);
+ if(length == send_length)
+ ei_block_output(dev, length, skb->data, ei_local->tx_start_page);
+ else
+ {
+ memset(scratch, 0, ETH_ZLEN);
+ memcpy(scratch, skb->data, skb->len);
+ ei_block_output(dev, ETH_ZLEN, scratch, ei_local->tx_start_page);
+ }
ei_local->txing = 1;
NS8390_trigger_send(dev, send_length, ei_local->tx_start_page);
dev->trans_start = jiffies;
reply other threads:[~2003-01-10 15:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301101626.44204@gandalf \
--to=rudmer@legolas.dynup.net \
--cc=linux-kernel@vger.kernel.org \
--cc=p_gortmaker@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox