From: dilinger@debian.org Date: Sat, 19 Mar 2005 05:32:44 +0000 (-0800) Subject: [PATCH] Possible AMD8111e free irq issue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8107bb0f1014a9af87a889feb20644f0845a08bd;p=thirdparty%2Fkernel%2Fstable.git [PATCH] Possible AMD8111e free irq issue It seems to me that if in the amd8111e_open() fuction dev->irq isn't zero and the irq request succeeds it might not get released anymore. Specifically, on failure of the amd8111e_restart() call the function returns -ENOMEM without releasing the irq. The amd8111e_restart() function can fail because of various pci_alloc_consistent() and dev_alloc_skb() calls in amd8111e_init_ring() which is being called by amd8111e_restart. 1374 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, 1375 dev->name, dev)) 1376 return -EAGAIN; Signed-off-by: Jeff Garzik Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index f1d81901ecf1f..4e6f7553ffec4 100755 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -1381,6 +1381,8 @@ static int amd8111e_open(struct net_device * dev ) if(amd8111e_restart(dev)){ spin_unlock_irq(&lp->lock); + if (dev->irq) + free_irq(dev->irq, dev); return -ENOMEM; } /* Start ipg timer */