On Sat, 2008-02-23 at 15:17 +0100, Johannes Berg wrote: > This fixes missing unlocks noticed by sparse. Thanks for the fix. It would be easier though to just acquire the lock later, since rcu_read_lock() is no longer needed to look for mesh peer links, like in this patch (applied to the original version of the file without the patch included in the mail I'm replying to). --- --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -262,7 +262,6 @@ static u32 hwmp_route_info_get(struct net_device *dev, bool process = true; u8 action = mgmt->u.action.u.mesh_action.action_code; - rcu_read_lock(); sta = sta_info_get(local, mgmt->sa); if (!sta) return 0; @@ -300,6 +299,7 @@ static u32 hwmp_route_info_get(struct net_device *dev, new_metric = MAX_METRIC; exp_time = TU_TO_EXP_TIME(orig_lifetime); + rcu_read_lock(); if (memcmp(orig_addr, dev->dev_addr, ETH_ALEN) == 0) { /* This MP is the originator, we are not interested in this * frame, except for updating transmitter's path info. -- Luis Carlos Cobo Rus GnuPG ID: 44019B60 cozybit Inc. -- Luis Carlos Cobo Rus GnuPG ID: 44019B60 cozybit Inc. - 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