aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-05-12 09:03:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-12 14:10:52 -0400
commitdea4096bc41a9642039840ced91e585d04883a16 (patch)
tree1b449e884faf3e23a0ca6812861c16faa9067c1a /net/mac80211
parentbe0e6aa5a0c487a2a0880dda8bc70f7f1860fc39 (diff)
mac80211: remove pointless mesh path timer RCU code
The code here to RCU-dereference a pointer that's on the stack is totally pointless, RCU isn't magic (like say Java's weak references are), so the code can't work like whoever wrote it thought it might. Remove it so readers don't get confused. Note that it seems that a bug is there anyway: I don't see any code that cancels the timer when a mesh path struct is destroyed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh_hwmp.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 849fecd0820e..2aec7c4f357b 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -966,20 +966,11 @@ endlookup:
966 966
967void mesh_path_timer(unsigned long data) 967void mesh_path_timer(unsigned long data)
968{ 968{
969 struct ieee80211_sub_if_data *sdata; 969 struct mesh_path *mpath = (void *) data;
970 struct mesh_path *mpath; 970 struct ieee80211_sub_if_data *sdata = mpath->sdata;
971
972 rcu_read_lock();
973 mpath = (struct mesh_path *) data;
974 mpath = rcu_dereference(mpath);
975 if (!mpath)
976 goto endmpathtimer;
977 sdata = mpath->sdata;
978 971
979 if (sdata->local->quiescing) { 972 if (sdata->local->quiescing)
980 rcu_read_unlock();
981 return; 973 return;
982 }
983 974
984 spin_lock_bh(&mpath->state_lock); 975 spin_lock_bh(&mpath->state_lock);
985 if (mpath->flags & MESH_PATH_RESOLVED || 976 if (mpath->flags & MESH_PATH_RESOLVED ||
@@ -996,8 +987,6 @@ void mesh_path_timer(unsigned long data)
996 } 987 }
997 988
998 spin_unlock_bh(&mpath->state_lock); 989 spin_unlock_bh(&mpath->state_lock);
999endmpathtimer:
1000 rcu_read_unlock();
1001} 990}
1002 991
1003void 992void