mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
3c515: Write outside array bounds
if dev_alloc_skb() fails on the first iteration, a write to cp->rx_ring[-1] occurs. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2a8aaacda5
commit
3d54015b75
@ -832,7 +832,9 @@ static int corkscrew_open(struct net_device *dev)
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
|
||||
}
|
||||
vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
|
||||
if (i != 0)
|
||||
vp->rx_ring[i - 1].next =
|
||||
isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
|
||||
outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
|
||||
}
|
||||
if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */
|
||||
|
Loading…
Reference in New Issue
Block a user