Search Linux Wireless

[PATCH 17/18] mac80211: mesh hwmp locking fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes missing unlocks noticed by sparse.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
 net/mac80211/mesh_hwmp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- everything.orig/net/mac80211/mesh_hwmp.c	2008-02-23 13:50:40.000000000 +0100
+++ everything/net/mac80211/mesh_hwmp.c	2008-02-23 13:51:11.000000000 +0100
@@ -264,8 +264,10 @@ static u32 hwmp_route_info_get(struct ne
 
 	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 ne
 		break;
 	default:
 		sta_info_put(sta);
+		rcu_read_unlock();
 		return 0;
 	}
 	new_metric = orig_metric + last_hop_metric;

-- 

-
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux