diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-01-11 23:41:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-12 15:26:56 -0500 |
commit | cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 (patch) | |
tree | 4cc157d564bd65d687bdf722af3202e9e277ea98 /net/mac80211 | |
parent | 9ee6045f09a7875ebe55b9942b232a19076b157b (diff) |
net: reintroduce missing rcu_assign_pointer() calls
commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
y).
We miss needed barriers, even on x86, when y is not NULL.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/agg-rx.c | 2 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 4 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 96debba2c40..1068f668ac4 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -332,7 +332,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
332 | status = WLAN_STATUS_SUCCESS; | 332 | status = WLAN_STATUS_SUCCESS; |
333 | 333 | ||
334 | /* activate it for RX */ | 334 | /* activate it for RX */ |
335 | RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx); | 335 | rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx); |
336 | 336 | ||
337 | if (timeout) | 337 | if (timeout) |
338 | mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); | 338 | mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 850bb96bd68..e60df48fa4d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -616,7 +616,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, | |||
616 | 616 | ||
617 | sdata->vif.bss_conf.dtim_period = new->dtim_period; | 617 | sdata->vif.bss_conf.dtim_period = new->dtim_period; |
618 | 618 | ||
619 | RCU_INIT_POINTER(sdata->u.ap.beacon, new); | 619 | rcu_assign_pointer(sdata->u.ap.beacon, new); |
620 | 620 | ||
621 | synchronize_rcu(); | 621 | synchronize_rcu(); |
622 | 622 | ||
@@ -1033,7 +1033,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
1033 | return -EBUSY; | 1033 | return -EBUSY; |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | RCU_INIT_POINTER(vlansdata->u.vlan.sta, sta); | 1036 | rcu_assign_pointer(vlansdata->u.vlan.sta, sta); |
1037 | } | 1037 | } |
1038 | 1038 | ||
1039 | sta->sdata = vlansdata; | 1039 | sta->sdata = vlansdata; |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index f8a32bf9821..b3d76b756cd 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -207,7 +207,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
207 | *pos++ = 0; /* U-APSD no in use */ | 207 | *pos++ = 0; /* U-APSD no in use */ |
208 | } | 208 | } |
209 | 209 | ||
210 | RCU_INIT_POINTER(ifibss->presp, skb); | 210 | rcu_assign_pointer(ifibss->presp, skb); |
211 | 211 | ||
212 | sdata->vif.bss_conf.beacon_int = beacon_int; | 212 | sdata->vif.bss_conf.beacon_int = beacon_int; |
213 | sdata->vif.bss_conf.basic_rates = basic_rates; | 213 | sdata->vif.bss_conf.basic_rates = basic_rates; |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index b197136aea2..3c428d4839c 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -73,7 +73,7 @@ static int sta_info_hash_del(struct ieee80211_local *local, | |||
73 | if (!s) | 73 | if (!s) |
74 | return -ENOENT; | 74 | return -ENOENT; |
75 | if (s == sta) { | 75 | if (s == sta) { |
76 | RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)], | 76 | rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)], |
77 | s->hnext); | 77 | s->hnext); |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
@@ -83,7 +83,7 @@ static int sta_info_hash_del(struct ieee80211_local *local, | |||
83 | s = rcu_dereference_protected(s->hnext, | 83 | s = rcu_dereference_protected(s->hnext, |
84 | lockdep_is_held(&local->sta_mtx)); | 84 | lockdep_is_held(&local->sta_mtx)); |
85 | if (rcu_access_pointer(s->hnext)) { | 85 | if (rcu_access_pointer(s->hnext)) { |
86 | RCU_INIT_POINTER(s->hnext, sta->hnext); | 86 | rcu_assign_pointer(s->hnext, sta->hnext); |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
@@ -226,7 +226,7 @@ static void sta_info_hash_add(struct ieee80211_local *local, | |||
226 | { | 226 | { |
227 | lockdep_assert_held(&local->sta_mtx); | 227 | lockdep_assert_held(&local->sta_mtx); |
228 | sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)]; | 228 | sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)]; |
229 | RCU_INIT_POINTER(local->sta_hash[STA_HASH(sta->sta.addr)], sta); | 229 | rcu_assign_pointer(local->sta_hash[STA_HASH(sta->sta.addr)], sta); |
230 | } | 230 | } |
231 | 231 | ||
232 | static void sta_unblock(struct work_struct *wk) | 232 | static void sta_unblock(struct work_struct *wk) |