From: Cyrill Gorcunov <gorcunov@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx: build fix] Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Acked-by: Zhu Yi <yi.zhu@xxxxxxxxx> Cc: "John W. Linville" <linville@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 + drivers/net/wireless/iwlwifi/iwl4965-base.c | 1 + 2 files changed, 2 insertions(+) diff -puN drivers/net/wireless/iwlwifi/iwl3945-base.c~iwlwifi3945-4965-fix-rate-control-algo-reference-leak drivers/net/wireless/iwlwifi/iwl3945-base.c --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c~iwlwifi3945-4965-fix-rate-control-algo-reference-leak +++ a/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6171,6 +6171,7 @@ static void iwl_alive_start(struct iwl_p mutex_lock(&priv->mutex); if (rc) { + iwl3945_rate_control_unregister(priv->hw); IWL_ERROR("Failed to register network " "device (error %d)\n", rc); return; diff -puN drivers/net/wireless/iwlwifi/iwl4965-base.c~iwlwifi3945-4965-fix-rate-control-algo-reference-leak drivers/net/wireless/iwlwifi/iwl4965-base.c --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c~iwlwifi3945-4965-fix-rate-control-algo-reference-leak +++ a/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -6527,6 +6527,7 @@ static void iwl_alive_start(struct iwl_p mutex_lock(&priv->mutex); if (rc) { + iwl4965_rate_control_unregister(priv->hw); IWL_ERROR("Failed to register network " "device (error %d)\n", rc); return; _ - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html