diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2014-08-01 13:27:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-02 19:41:15 -0700 |
commit | d31944d6f0872ba9536501c4850dfb20dea5bf64 (patch) | |
tree | 8d4b65758333c3cf5732a8c0520585f01917e494 | |
parent | d3e2edb70ecf877b4e5f42314449fc648b18627b (diff) | |
download | linux-d31944d6f0872ba9536501c4850dfb20dea5bf64.tar.gz linux-d31944d6f0872ba9536501c4850dfb20dea5bf64.tar.bz2 linux-d31944d6f0872ba9536501c4850dfb20dea5bf64.zip |
i40evf: don't leak queue vectors
Fix a memory leak. Driver was allocating memory for queue vectors on
init but not freeing them on shutdown. These need to be freed at two
different times: during module unload, and during reset recovery when
the driver cannot contact the PF driver and needs to give up.
Change-ID: I7c1d0157a776e960d4da432dfe309035aad7c670
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index 2aca9cf45119..0c4f7baffad6 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -1542,6 +1542,7 @@ static void i40evf_reset_task(struct work_struct *work) i40evf_free_misc_irq(adapter); i40evf_reset_interrupt_capability(adapter); i40evf_free_queues(adapter); + i40evf_free_q_vectors(adapter); kfree(adapter->vf_res); i40evf_shutdown_adminq(hw); adapter->netdev->flags &= ~IFF_UP; @@ -2429,6 +2430,7 @@ static void i40evf_remove(struct pci_dev *pdev) i40evf_misc_irq_disable(adapter); i40evf_free_misc_irq(adapter); i40evf_reset_interrupt_capability(adapter); + i40evf_free_q_vectors(adapter); } if (adapter->watchdog_timer.function) |