Re: [PATCH-2.2.19] bug in cs89x0

David Weinehall (tao@acc.umu.se)
Wed, 26 Sep 2001 00:47:55 +0200


On Tue, Sep 25, 2001 at 10:11:42AM +0200, Kapr Johnik wrote:
> 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.

The same error exists in the v2.4-kernel, drivers/net/mac89x0.c

/David Weinehall

--- linux-2.4.10/drivers/net/mac89x0.c.old Wed Sep 26 00:45:44 2001
+++ linux-2.4.10/drivers/net/mac89x0.c Wed Sep 26 00:46:34 2001
@@ -524,7 +524,7 @@
lp->stats.rx_dropped++;
return;
}
- skb->len = length;
+ skb_put(skb, length);
skb->dev = dev;

memcpy_fromio(skb->data, dev->mem_start + PP_RxFrame, length);
-
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/