aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 849fecd0820..2aec7c4f357 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