提交 a5acc379 编写于 作者: C Cyrill Gorcunov 提交者: John W. Linville

iwlwifi3945/4965: fix rate control algo reference leak

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: NCyrill Gorcunov <gorcunov@gmail.com>
Acked-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b808ab16
...@@ -6171,6 +6171,7 @@ static void iwl_alive_start(struct iwl_priv *priv) ...@@ -6171,6 +6171,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
if (rc) { if (rc) {
iwl_rate_control_unregister(priv->hw);
IWL_ERROR("Failed to register network " IWL_ERROR("Failed to register network "
"device (error %d)\n", rc); "device (error %d)\n", rc);
return; return;
......
...@@ -6527,6 +6527,7 @@ static void iwl_alive_start(struct iwl_priv *priv) ...@@ -6527,6 +6527,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
if (rc) { if (rc) {
iwl_rate_control_unregister(priv->hw);
IWL_ERROR("Failed to register network " IWL_ERROR("Failed to register network "
"device (error %d)\n", rc); "device (error %d)\n", rc);
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册