linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak
@ 2007-12-06  9:39 Cyrill Gorcunov
  2007-12-07  1:39 ` Zhu Yi
  0 siblings, 1 reply; 4+ messages in thread
From: Cyrill Gorcunov @ 2007-12-06  9:39 UTC (permalink / raw)
  To: Thomas Tuttle; +Cc: LKML, Andrew Morton, Michael Wu, LWML

Hi Thomas,

could you test this one please.

---
From: Cyrill Gorcunov <gorcunov@gmail.com>
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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    1 +
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 465da4f..c222bec 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -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;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 9918780..9295755 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -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;
-- 
1.5.3.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak
  2007-12-06  9:39 [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak Cyrill Gorcunov
@ 2007-12-07  1:39 ` Zhu Yi
  2007-12-08 14:56   ` Mark Lord
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yi @ 2007-12-07  1:39 UTC (permalink / raw)
  To: Cyrill Gorcunov, John W.Linville
  Cc: Thomas Tuttle, LKML, Andrew Morton, Michael Wu, LWML


On Thu, 2007-12-06 at 12:39 +0300, Cyrill Gorcunov wrote:
> From: Cyrill Gorcunov <gorcunov@gmail.com>
> 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
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak
  2007-12-07  1:39 ` Zhu Yi
@ 2007-12-08 14:56   ` Mark Lord
  2007-12-10  3:04     ` Zhu Yi
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Lord @ 2007-12-08 14:56 UTC (permalink / raw)
  To: Zhu Yi
  Cc: Cyrill Gorcunov, John W.Linville, Thomas Tuttle, LKML,
	Andrew Morton, Michael Wu, LWML

Zhu Yi wrote:
> On Thu, 2007-12-06 at 12:39 +0300, Cyrill Gorcunov wrote:
>> From: Cyrill Gorcunov <gorcunov@gmail.com>
>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak
  2007-12-08 14:56   ` Mark Lord
@ 2007-12-10  3:04     ` Zhu Yi
  0 siblings, 0 replies; 4+ messages in thread
From: Zhu Yi @ 2007-12-10  3:04 UTC (permalink / raw)
  To: Mark Lord
  Cc: Cyrill Gorcunov, John W.Linville, Thomas Tuttle, LKML,
	Andrew Morton, Michael Wu, LWML


On Sat, 2007-12-08 at 09:56 -0500, Mark Lord wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-10  3:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-06  9:39 [PATCH] iwlwifi3945/4965 - fix rate control algo reference leak Cyrill Gorcunov
2007-12-07  1:39 ` Zhu Yi
2007-12-08 14:56   ` Mark Lord
2007-12-10  3:04     ` Zhu Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).