Skip to contentSkip to conversation

Patch "iwlwifi: mvm: Fix paging memory leak" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Apr 10, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iwlwifi: mvm: Fix paging memory leak

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
iwlwifi-mvm-fix-paging-memory-leak.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 905e36ae172c83a30894a3adefab7d4f850fcf54 Mon Sep 17 00:00:00 2001

From: Matti Gottlieb <[email protected]>
Date: Sun, 14 Feb 2016 17:05:39 +0200
Subject: iwlwifi: mvm: Fix paging memory leak

From: Matti Gottlieb <[email protected]>

commit 905e36ae172c83a30894a3adefab7d4f850fcf54 upstream.

If the opmode is stopped and started again we did not free the paging buffers. Fix that.
In addition when freeing the firmware's paging download buffer, set the pointer to NULL.

---
 drivers/net/wireless/iwlwifi/mvm/fw.c  |    4 +++-
 drivers/net/wireless/iwlwifi/mvm/mvm.h |    3 +++
 drivers/net/wireless/iwlwifi/mvm/ops.c |    2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/iwlwifi/mvm/fw.c +3 -1
@@ -106,7 +106,7 @@ static int iwl_send_tx_ant_cfg(struct iw
 				    sizeof(tx_ant_cmd), &tx_ant_cmd);
 }
 
-static void iwl_free_fw_paging(struct iwl_mvm *mvm)
+void iwl_free_fw_paging(struct iwl_mvm *mvm)
 {
 	int i;
 
@@ -126,6 +126,8 @@ static void iwl_free_fw_paging(struct iw
 			     get_order(mvm->fw_paging_db[i].fw_paging_size));
 	}
 	kfree(mvm->trans->paging_download_buf);
+	mvm->trans->paging_download_buf = NULL;
+
 	memset(mvm->fw_paging_db, 0, sizeof(mvm->fw_paging_db));
 }
 
drivers/net/wireless/iwlwifi/mvm/mvm.h +3 -0
@@ -1190,6 +1190,9 @@ void iwl_mvm_rx_umac_scan_complete_notif
 void iwl_mvm_rx_umac_scan_iter_complete_notif(struct iwl_mvm *mvm,
 					      struct iwl_rx_cmd_buffer *rxb);
 
+/* Paging */
+void iwl_free_fw_paging(struct iwl_mvm *mvm);
+
 /* MVM debugfs */
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir);
drivers/net/wireless/iwlwifi/mvm/ops.c +2 -0
@@ -645,6 +645,8 @@ static void iwl_op_mode_mvm_stop(struct
 	for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
 		kfree(mvm->nvm_sections[i].data);
 
+	iwl_free_fw_paging(mvm);
+
 	iwl_mvm_tof_clean(mvm);
 
 	ieee80211_free_hw(mvm->hw);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/iwlwifi-mvm-fix-paging-memory-leak.patch