Re: [PATCH] net: winbond-840: release IRQ on alloc_ringdesc() error path
From: Andrew Lunn
Date: Thu Oct 08 2026 - 15:20:52 EST
On Fri, Oct 09, 2026 at 12:21:09AM +0800, Haotian Zhang wrote:
> netdev_open() registers the shared IRQ with request_irq() and then calls
> alloc_ringdesc(). When alloc_ringdesc() fails, the error path jumps to
> out_err, which only calls netif_device_attach() and returns. The IRQ
> handler stays registered forever: net/core/dev.c never calls ndo_stop
> when ndo_open fails, so netdev_close(), the only place that frees the
> IRQ, is never reached. The leaked handler is also left enabled on an
> uninitialised device.
>
> Add a separate out_err_free_irq label that releases the IRQ before
> returning the allocation error, mirroring the cleanup already used by
> the sibling de2104x driver.
Please set the subject line correctly:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
This obviously does not bother anybody, or it would of been fixed by
now. Please post this to net-next.
You might want to concentrate on drivers from the last decade?
Andrew
---
pw-bot: cr