public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roger Luethi <rl@hellgate.ch>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.4] etherleak fix for via-rhine
Date: Thu, 30 Jan 2003 10:52:06 +0100	[thread overview]
Message-ID: <20030130095206.GA3100@k3.hellgate.ch> (raw)

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]

Use skb_padto to plug that leak. Patch is already in ac, 2.5. Please apply.


[-- Attachment #2: via-rhine.c-2.4.21-pre4-skb_padto.diff --]
[-- Type: text/plain, Size: 430 bytes --]

--- linux-2.4.21-pre4/drivers/net/via-rhine.c.org	Thu Jan 30 10:38:32 2003
+++ linux-2.4.21-pre4/drivers/net/via-rhine.c	Thu Jan 30 10:46:57 2003
@@ -1239,6 +1239,12 @@
 	/* Calculate the next Tx descriptor entry. */
 	entry = np->cur_tx % TX_RING_SIZE;
 
+	if (skb->len < ETH_ZLEN) {
+		skb = skb_padto(skb, ETH_ZLEN);
+		if (skb == NULL)
+			return 0;
+	}
+
 	np->tx_skbuff[entry] = skb;
 
 	if ((np->drv_flags & ReqTxAlign) &&

                 reply	other threads:[~2003-01-30  9:43 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=20030130095206.GA3100@k3.hellgate.ch \
    --to=rl@hellgate.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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