Skip to contentSkip to conversation

iwlwifi3945/4965 - fix rate control algo reference leak

PATCH In review Cyrill Gorcunov 3 participants 4 messages Dec 6, 2007 – Dec 10, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi3945/4965 - fix rate control algo reference leak

Hi Thomas,

could you test this one please.

---
From: Cyrill Gorcunov <[email protected]>
Subject: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak

This patch does fix rate control algo reference leak in case if network device has been failed to register. In this case special flag priv->mac80211_registered is not set and the rate algo reference is not freeing on module unload. That leads to OOPs in further ieee80211 rate register/unregister procedure (by any callee).

It should fix the bug #9470

	http://bugzilla.kernel.org/show_bug.cgi?id=9470
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    1 +
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -0
index 465da4f..c222bec 100644
@@ -6167,6 +6167,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
 		mutex_lock(&priv->mutex);
 
 		if (rc) {
+			iwl_rate_control_unregister(priv->hw);
 			IWL_ERROR("Failed to register network "
 				  "device (error %d)\n", rc);
 			return;
drivers/net/wireless/iwlwifi/iwl4965-base.c +1 -0
index 9918780..9295755 100644
@@ -6523,6 +6523,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
 		mutex_lock(&priv->mutex);
 
 		if (rc) {
+			iwl_rate_control_unregister(priv->hw);
 			IWL_ERROR("Failed to register network "
 				  "device (error %d)\n", rc);
 			return;
Signature · 1 line
1.5.3.5
#1 lore raw
Quoted 12 lines · Cyrill Gorcunov

From: Cyrill Gorcunov <[email protected]>
Subject: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak

This patch does fix rate control algo reference leak in case if network device has been failed to register. In this case special flag priv->mac80211_registered is not set and the rate algo reference is not freeing on module unload. That leads to OOPs in further ieee80211 rate register/unregister procedure (by any callee).

It should fix the bug #9470

Quoted 7 lines
	http://bugzilla.kernel.org/show_bug.cgi?id=9470
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    1 +
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

ACK. Thanks for the fix.

John, I think it should be in 2.6.24.

Thanks,
-yi

#2 lore raw
Quoted 3 lines · Zhu Yi
Quoted 2 lines · Cyrill Gorcunov

From: Cyrill Gorcunov <[email protected]>
Subject: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak

..

Any chance of getting LEDs support re-added to this driver, perhaps in the 2.6.25 timeframe?

With that in there, I could finally switch the machines around here away from the earlier ipw3945 stuff.

Thanks

#3 lore raw
Quoted 3 lines · Mark Lord

Any chance of getting LEDs support re-added to this driver, perhaps in the 2.6.25 timeframe?

I'd also like to see it happen. Stay tuned.

Thanks,
-yi