Skip to content

Commit 7fdf966

Browse files
mattigotegrumbach
authored andcommitted
iwlwifi: mvm: fix memory leak in paging
Currently paging download buffer is freed during the the unloading of the opmode which happens when the driver is unloaded. This causes a memory leak since the paging download buffer is allocated every time we enable the interface, so the download buffer can be allocated many times, but only be freed once. Free paging download buffer during disabling of the interface. CC: stable@vger.kernel.org [4.3+] Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
1 parent 9fc515b commit 7fdf966

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,8 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
11471147
/* the fw is stopped, the aux sta is dead: clean up driver state */
11481148
iwl_mvm_del_aux_sta(mvm);
11491149

1150+
iwl_free_fw_paging(mvm);
1151+
11501152
/*
11511153
* Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
11521154
* won't be called in this case).

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,6 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
761761
for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
762762
kfree(mvm->nvm_sections[i].data);
763763

764-
iwl_free_fw_paging(mvm);
765-
766764
iwl_mvm_tof_clean(mvm);
767765

768766
ieee80211_free_hw(mvm->hw);

0 commit comments

Comments
 (0)