[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090814.161701.02803885.davem@davemloft.net>
Date: Fri, 14 Aug 2009 16:17:01 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: roel.kluin@...il.com
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] yellowfin: Fix buffer underrun after dev_alloc_skb()
failure
From: Roel Kluin <roel.kluin@...il.com>
Date: Fri, 14 Aug 2009 11:59:14 +0200
> /* Reset the chip. */
> iowrite32(0x80000000, ioaddr + DMACtrl);
>
> - i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev);
> - if (i) return i;
> + ret = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev);
> + if (ret)
> + return ret;
>
> if (yellowfin_debug > 1)
> printk(KERN_DEBUG "%s: yellowfin_open() irq %d.\n",
> dev->name, dev->irq);
>
> - yellowfin_init_ring(dev);
> + ret = yellowfin_init_ring(dev);
> + if (ret)
> + return ret;
>
> iowrite32(yp->rx_ring_dma, ioaddr + RxPtr);
> iowrite32(yp->tx_ring_dma, ioaddr + TxPtr);
If yellowfin_init_ring() returns an error, you're leaking the IRQ
allocated by request_irq().
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists