Skip to contentSkip to conversation

ieee80211_rate: missed unlock

PATCH In review [email protected] 2 participants 2 messages Dec 18, 2007 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ieee80211_rate: missed unlock

From: Cyrill Gorcunov <[email protected]>

Cc "John W. Linville" <[email protected]>

---

 net/mac80211/ieee80211_rate.c |    1 +
 1 file changed, 1 insertion(+)
net/mac80211/ieee80211_rate.c renamed from net/mac80211/ieee80211_rate.c~ieee80211_rate-missed-unlock +1 -0
diff -puN net/mac80211/ieee80211_rate.c~ieee80211_rate-missed-unlock net/mac80211/ieee80211_rate.c
@@ -33,6 +33,7 @@ int ieee80211_rate_control_register(stru
 		if (!strcmp(alg->ops->name, ops->name)) {
 			/* don't register an algorithm twice */
 			WARN_ON(1);
+			mutex_unlock(&rate_ctrl_mutex);
 			return -EALREADY;
 		}
 	}

_

maintainer Acked-by on v1 1/4
#1 lore raw
Quoted 4 lines · On Mon, 2007-12-17 at 16:22 -0800, [email protected] wrote:

From: Cyrill Gorcunov <[email protected]>

Cc "John W. Linville" <[email protected]>

My mistake, good catch.

Quoted 22 lines

---

 net/mac80211/ieee80211_rate.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN net/mac80211/ieee80211_rate.c~ieee80211_rate-missed-unlock net/mac80211/ieee80211_rate.c

net/mac80211/ieee80211_rate.c renamed from net/mac80211/ieee80211_rate.c~ieee80211_rate-missed-unlock +1 -0
@@ -33,6 +33,7 @@ int ieee80211_rate_control_register(stru
 		if (!strcmp(alg->ops->name, ops->name)) {
 			/* don't register an algorithm twice */
 			WARN_ON(1);
+			mutex_unlock(&rate_ctrl_mutex);
 			return -EALREADY;
 		}
 	}

_
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html