Subject: [PATCH] e1000: ring buffers resources cleanup

From: Vasily Averin <[email-masked]>
Date: Fri, 18 Aug 2006 19:23:43 +0400

irq leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge:
if e1000_up fails in e1000_open() we do not free allocated irq

Signed-off-by: Vasily Averin <[email-masked]>

Thank you,
	Vasily Averin
SWsoft Virtuozzo/OpenVZ Linux kernel team
--- linux-2.6.18-rc4/drivers/net/e1000/e1000_main.c.oirq	2006-08-18 18:53:05.000000000 +0400
+++ linux-2.6.18-rc4/drivers/net/e1000/e1000_main.c	2006-08-18 19:18:22.000000000 +0400
@@ -1208,7 +1208,7 @@ e1000_open(struct net_device *netdev)
 
 	err = e1000_request_irq(adapter);
 	if (err)
-		goto err_up;
+		goto err_req_irq;
 
 	e1000_power_up_phy(adapter);
 
@@ -1229,6 +1229,8 @@ e1000_open(struct net_device *netdev)
 	return E1000_SUCCESS;
 
 err_up:
+	e1000_free_irq(adapter);
+err_req_irq:
 	e1000_free_all_rx_resources(adapter);
 err_setup_rx:
 	e1000_free_all_tx_resources(adapter);