bug in cs89x0
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.
drivers/net/cs89x0.c +0 -0
@@ -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);Quoted 6 lines · Kapr Johnik
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 toskb->lenand leavesskb->tailincorrect. Patch follows.
The same error exists in the v2.4-kernel, drivers/net/mac89x0.c
/David Weinehall
drivers/net/mac89x0.c renamed from drivers/net/mac89x0.c.old +1 -1
@@ -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);