Skip to content

Commit

Permalink
iwlwifi3945/4965: fix rate control algo reference leak
Browse files Browse the repository at this point in the history
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

[akpm@linux-foundation.org: build fix]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Cyrill Gorcunov authored and John W. Linville committed Dec 17, 2007
1 parent b808ab1 commit a5acc37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -6171,6 +6171,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;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -6527,6 +6527,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;
Expand Down

0 comments on commit a5acc37

Please sign in to comment.