summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-23 15:17:20 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 21:30:42 +0100
commitdc0b0f7d1e34b797b98e4d16122b3ea6f775154c (patch)
tree6b1bbfa17735243eb8c8f9bd394ffe169bd7c22b /net/mac80211
parentmac80211: clean up mesh code (diff)
downloadlinux-dc0b0f7d1e34b797b98e4d16122b3ea6f775154c.tar.xz
linux-dc0b0f7d1e34b797b98e4d16122b3ea6f775154c.zip
mac80211: mesh hwmp locking fixes
This fixes missing unlocks noticed by sparse. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_hwmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 9a501aae48eb..c2f40ef418cf 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -264,8 +264,10 @@ static u32 hwmp_route_info_get(struct net_device *dev,
rcu_read_lock();
sta = sta_info_get(local, mgmt->sa);
- if (!sta)
+ if (!sta) {
+ rcu_read_unlock();
return 0;
+ }
last_hop_metric = airtime_link_metric_get(local, sta);
/* Update and check originator routing info */
@@ -293,6 +295,7 @@ static u32 hwmp_route_info_get(struct net_device *dev,
break;
default:
sta_info_put(sta);
+ rcu_read_unlock();
return 0;
}
new_metric = orig_metric + last_hop_metric;