summaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-08-08 00:08:40 -0700
committerJeff Garzik <jgarzik@redhat.com>2008-08-14 04:43:08 -0400
commit9e410778047d0f2887adb888b44eda4d72d4f67d (patch)
tree26abc4daef3178d00592f09e130c5918017e2e3b /drivers/net/netxen
parent9dc28efeee98a4f81d5469d3576f55c5e6d1a5db (diff)
downloadlinux-stable-9e410778047d0f2887adb888b44eda4d72d4f67d.tar.gz
linux-stable-9e410778047d0f2887adb888b44eda4d72d4f67d.tar.bz2
linux-stable-9e410778047d0f2887adb888b44eda4d72d4f67d.zip
netxen: fix rxbuf leak across driver reload
Free up rx ring during driver unload or open() failure. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 6fc42cd30729..056f6b17a331 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1017,6 +1017,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
netxen_free_hw_resources(adapter);
+ netxen_release_rx_buffers(adapter);
netxen_free_sw_resources(adapter);
}
@@ -1111,7 +1112,7 @@ static int netxen_nic_open(struct net_device *netdev)
flags, netdev->name, adapter);
if (err) {
printk(KERN_ERR "request_irq failed with: %d\n", err);
- goto err_out_free_hw;
+ goto err_out_free_rxbuf;
}
adapter->is_up = NETXEN_ADAPTER_UP_MAGIC;
@@ -1144,7 +1145,8 @@ static int netxen_nic_open(struct net_device *netdev)
err_out_free_irq:
free_irq(adapter->irq, adapter);
-err_out_free_hw:
+err_out_free_rxbuf:
+ netxen_release_rx_buffers(adapter);
netxen_free_hw_resources(adapter);
err_out_free_sw:
netxen_free_sw_resources(adapter);