[PATCH-2.2.19] bug in cs89x0

Kapr Johnik (kapr.johnik@seznam.cz)
Tue, 25 Sep 2001 10:11:42 +0200


Hi to all.

I think I've found bug in the cs89x0 network driver in 2.2.19, which we
are using in an embedded network router. The driver does not use
skb_put(), instead it writes directly to skb->len and leaves skb->tail
incorrect. Patch follows.

diff -u -r linux-2.2.19/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
--- linux-2.2.19/drivers/net/cs89x0.c Sun Mar 25 18:37:34 2001
+++ linux/drivers/net/cs89x0.c Tue Sep 25 09:39:35 2001
@@ -904,7 +904,7 @@
lp->stats.rx_dropped++;
return;
}
- skb->len = length;
+ skb_put(skb, length);
skb->dev = dev;

insw(ioaddr + RX_FRAME_PORT, skb->data, length >> 1);

-
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/