Skip to content

Commit

Permalink
mac80211: mesh hwmp locking fixes
Browse files Browse the repository at this point in the history
This fixes missing unlocks noticed by sparse.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 6, 2008
1 parent 902acc7 commit dc0b0f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dc0b0f7

Please sign in to comment.