[PATCH] 8139too: too early dev_kfree_skb

Pozsar Balazs (pozsy@sch.bme.hu)
Wed, 9 Jan 2002 20:35:24 +0100 (MET)


This patch was originally sent to lkml on nov 30, 2001, from
<kumon@flab.fujitsu.co.jp>, but it is not in 2.4.18-pre2.

Was it just overlooked, or is it unneccessary?

Note that I rediffed it, and moved the +dev_kfree_skb after the DPRINTK,
because it also uses the len.

patch follows:

--- linux/drivers/net/8139too.c.orig Fri Dec 21 12:41:54 2001
+++ linux/drivers/net/8139too.c Wed Jan 9 20:19:43 2002
@@ -1643,7 +1643,6 @@

if (likely(len < TX_BUF_SIZE)) {
skb_copy_and_csum_dev(skb, tp->tx_buf[entry]);
- dev_kfree_skb(skb);
} else {
dev_kfree_skb(skb);
tp->stats.tx_dropped++;
@@ -1667,6 +1666,7 @@
DPRINTK ("%s: Queued Tx packet size %u to slot %d.\n",
dev->name, len, entry);

+ dev_kfree_skb(skb);
return 0;
}

-- 
Balazs Pozsar.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/