diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-05-12 15:03:32 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-12 14:10:52 -0400 |
commit | dea4096bc41a9642039840ced91e585d04883a16 (patch) | |
tree | 1b449e884faf3e23a0ca6812861c16faa9067c1a /net | |
parent | be0e6aa5a0c487a2a0880dda8bc70f7f1860fc39 (diff) | |
download | linux-dea4096bc41a9642039840ced91e585d04883a16.tar.bz2 |
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')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 17 |
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: void mesh_path_timer(unsigned long data) { - struct ieee80211_sub_if_data *sdata; - struct mesh_path *mpath; - - rcu_read_lock(); - mpath = (struct mesh_path *) data; - mpath = rcu_dereference(mpath); - if (!mpath) - goto endmpathtimer; - sdata = mpath->sdata; + struct mesh_path *mpath = (void *) data; + struct ieee80211_sub_if_data *sdata = mpath->sdata; - if (sdata->local->quiescing) { - rcu_read_unlock(); + if (sdata->local->quiescing) return; - } spin_lock_bh(&mpath->state_lock); if (mpath->flags & MESH_PATH_RESOLVED || @@ -996,8 +987,6 @@ void mesh_path_timer(unsigned long data) } spin_unlock_bh(&mpath->state_lock); -endmpathtimer: - rcu_read_unlock(); } void |