public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.4] etherleak fix for via-rhine
@ 2003-01-30  9:52 Roger Luethi
  0 siblings, 0 replies; only message in thread
From: Roger Luethi @ 2003-01-30  9:52 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

[-- 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) &&

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-30  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30  9:52 [PATCH][2.4] etherleak fix for via-rhine Roger Luethi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox