Commit cf778b00e96df6d64f8e21b8395d1f8a859ecdc7
Committed by
David S. Miller
1 parent
9ee6045f09
Exists in
master
and in
6 other branches
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>
Showing 32 changed files with 61 additions and 63 deletions Side-by-side Diff
- net/core/net-sysfs.c
- net/core/netpoll.c
- net/decnet/dn_dev.c
- net/ipv4/devinet.c
- net/ipv4/fib_trie.c
- net/ipv4/igmp.c
- net/ipv4/ipip.c
- net/ipv4/ipmr.c
- net/ipv6/addrconf.c
- net/ipv6/ip6_tunnel.c
- net/ipv6/raw.c
- net/ipv6/sit.c
- net/mac80211/agg-rx.c
- net/mac80211/cfg.c
- net/mac80211/ibss.c
- net/mac80211/sta_info.c
- net/netfilter/nf_conntrack_core.c
- net/netfilter/nf_conntrack_ecache.c
- net/netfilter/nf_conntrack_extend.c
- net/netfilter/nf_conntrack_helper.c
- net/netfilter/nf_conntrack_netlink.c
- net/netfilter/nf_log.c
- net/netfilter/nf_queue.c
- net/netfilter/nfnetlink.c
- net/netlabel/netlabel_domainhash.c
- net/netlabel/netlabel_unlabeled.c
- net/phonet/af_phonet.c
- net/phonet/pn_dev.c
- net/phonet/socket.c
- net/socket.c
- net/sunrpc/auth_gss/auth_gss.c
- net/xfrm/xfrm_user.c
net/core/net-sysfs.c
... | ... | @@ -1177,9 +1177,9 @@ |
1177 | 1177 | nonempty = 1; |
1178 | 1178 | } |
1179 | 1179 | |
1180 | - if (nonempty) | |
1181 | - RCU_INIT_POINTER(dev->xps_maps, new_dev_maps); | |
1182 | - else { | |
1180 | + if (nonempty) { | |
1181 | + rcu_assign_pointer(dev->xps_maps, new_dev_maps); | |
1182 | + } else { | |
1183 | 1183 | kfree(new_dev_maps); |
1184 | 1184 | RCU_INIT_POINTER(dev->xps_maps, NULL); |
1185 | 1185 | } |
net/core/netpoll.c
net/decnet/dn_dev.c
... | ... | @@ -388,7 +388,7 @@ |
388 | 388 | } |
389 | 389 | |
390 | 390 | ifa->ifa_next = dn_db->ifa_list; |
391 | - RCU_INIT_POINTER(dn_db->ifa_list, ifa); | |
391 | + rcu_assign_pointer(dn_db->ifa_list, ifa); | |
392 | 392 | |
393 | 393 | dn_ifaddr_notify(RTM_NEWADDR, ifa); |
394 | 394 | blocking_notifier_call_chain(&dnaddr_chain, NETDEV_UP, ifa); |
... | ... | @@ -1093,7 +1093,7 @@ |
1093 | 1093 | |
1094 | 1094 | memcpy(&dn_db->parms, p, sizeof(struct dn_dev_parms)); |
1095 | 1095 | |
1096 | - RCU_INIT_POINTER(dev->dn_ptr, dn_db); | |
1096 | + rcu_assign_pointer(dev->dn_ptr, dn_db); | |
1097 | 1097 | dn_db->dev = dev; |
1098 | 1098 | init_timer(&dn_db->timer); |
1099 | 1099 |
net/ipv4/devinet.c
net/ipv4/fib_trie.c
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 | return (struct tnode *)(parent & ~NODE_TYPE_MASK); |
206 | 206 | } |
207 | 207 | |
208 | -/* Same as RCU_INIT_POINTER | |
208 | +/* Same as rcu_assign_pointer | |
209 | 209 | * but that macro() assumes that value is a pointer. |
210 | 210 | */ |
211 | 211 | static inline void node_set_parent(struct rt_trie_node *node, struct tnode *ptr) |
... | ... | @@ -529,7 +529,7 @@ |
529 | 529 | if (n) |
530 | 530 | node_set_parent(n, tn); |
531 | 531 | |
532 | - RCU_INIT_POINTER(tn->child[i], n); | |
532 | + rcu_assign_pointer(tn->child[i], n); | |
533 | 533 | } |
534 | 534 | |
535 | 535 | #define MAX_WORK 10 |
... | ... | @@ -1015,7 +1015,7 @@ |
1015 | 1015 | |
1016 | 1016 | tp = node_parent((struct rt_trie_node *) tn); |
1017 | 1017 | if (!tp) |
1018 | - RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | |
1018 | + rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | |
1019 | 1019 | |
1020 | 1020 | tnode_free_flush(); |
1021 | 1021 | if (!tp) |
... | ... | @@ -1027,7 +1027,7 @@ |
1027 | 1027 | if (IS_TNODE(tn)) |
1028 | 1028 | tn = (struct tnode *)resize(t, (struct tnode *)tn); |
1029 | 1029 | |
1030 | - RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | |
1030 | + rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | |
1031 | 1031 | tnode_free_flush(); |
1032 | 1032 | } |
1033 | 1033 | |
... | ... | @@ -1164,7 +1164,7 @@ |
1164 | 1164 | put_child(t, (struct tnode *)tp, cindex, |
1165 | 1165 | (struct rt_trie_node *)tn); |
1166 | 1166 | } else { |
1167 | - RCU_INIT_POINTER(t->trie, (struct rt_trie_node *)tn); | |
1167 | + rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | |
1168 | 1168 | tp = tn; |
1169 | 1169 | } |
1170 | 1170 | } |
net/ipv4/igmp.c
... | ... | @@ -1249,7 +1249,7 @@ |
1249 | 1249 | |
1250 | 1250 | im->next_rcu = in_dev->mc_list; |
1251 | 1251 | in_dev->mc_count++; |
1252 | - RCU_INIT_POINTER(in_dev->mc_list, im); | |
1252 | + rcu_assign_pointer(in_dev->mc_list, im); | |
1253 | 1253 | |
1254 | 1254 | #ifdef CONFIG_IP_MULTICAST |
1255 | 1255 | igmpv3_del_delrec(in_dev, im->multiaddr); |
... | ... | @@ -1821,7 +1821,7 @@ |
1821 | 1821 | iml->next_rcu = inet->mc_list; |
1822 | 1822 | iml->sflist = NULL; |
1823 | 1823 | iml->sfmode = MCAST_EXCLUDE; |
1824 | - RCU_INIT_POINTER(inet->mc_list, iml); | |
1824 | + rcu_assign_pointer(inet->mc_list, iml); | |
1825 | 1825 | ip_mc_inc_group(in_dev, addr); |
1826 | 1826 | err = 0; |
1827 | 1827 | done: |
... | ... | @@ -2008,7 +2008,7 @@ |
2008 | 2008 | atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); |
2009 | 2009 | kfree_rcu(psl, rcu); |
2010 | 2010 | } |
2011 | - RCU_INIT_POINTER(pmc->sflist, newpsl); | |
2011 | + rcu_assign_pointer(pmc->sflist, newpsl); | |
2012 | 2012 | psl = newpsl; |
2013 | 2013 | } |
2014 | 2014 | rv = 1; /* > 0 for insert logic below if sl_count is 0 */ |
... | ... | @@ -2111,7 +2111,7 @@ |
2111 | 2111 | } else |
2112 | 2112 | (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, |
2113 | 2113 | 0, NULL, 0); |
2114 | - RCU_INIT_POINTER(pmc->sflist, newpsl); | |
2114 | + rcu_assign_pointer(pmc->sflist, newpsl); | |
2115 | 2115 | pmc->sfmode = msf->imsf_fmode; |
2116 | 2116 | err = 0; |
2117 | 2117 | done: |
net/ipv4/ipip.c
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | (iter = rtnl_dereference(*tp)) != NULL; |
232 | 232 | tp = &iter->next) { |
233 | 233 | if (t == iter) { |
234 | - RCU_INIT_POINTER(*tp, t->next); | |
234 | + rcu_assign_pointer(*tp, t->next); | |
235 | 235 | break; |
236 | 236 | } |
237 | 237 | } |
... | ... | @@ -241,8 +241,8 @@ |
241 | 241 | { |
242 | 242 | struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t); |
243 | 243 | |
244 | - RCU_INIT_POINTER(t->next, rtnl_dereference(*tp)); | |
245 | - RCU_INIT_POINTER(*tp, t); | |
244 | + rcu_assign_pointer(t->next, rtnl_dereference(*tp)); | |
245 | + rcu_assign_pointer(*tp, t); | |
246 | 246 | } |
247 | 247 | |
248 | 248 | static struct ip_tunnel * ipip_tunnel_locate(struct net *net, |
... | ... | @@ -792,7 +792,7 @@ |
792 | 792 | return -ENOMEM; |
793 | 793 | |
794 | 794 | dev_hold(dev); |
795 | - RCU_INIT_POINTER(ipn->tunnels_wc[0], tunnel); | |
795 | + rcu_assign_pointer(ipn->tunnels_wc[0], tunnel); | |
796 | 796 | return 0; |
797 | 797 | } |
798 | 798 |
net/ipv4/ipmr.c
... | ... | @@ -1225,7 +1225,7 @@ |
1225 | 1225 | |
1226 | 1226 | ret = ip_ra_control(sk, 1, mrtsock_destruct); |
1227 | 1227 | if (ret == 0) { |
1228 | - RCU_INIT_POINTER(mrt->mroute_sk, sk); | |
1228 | + rcu_assign_pointer(mrt->mroute_sk, sk); | |
1229 | 1229 | IPV4_DEVCONF_ALL(net, MC_FORWARDING)++; |
1230 | 1230 | } |
1231 | 1231 | rtnl_unlock(); |
net/ipv6/addrconf.c
... | ... | @@ -429,7 +429,7 @@ |
429 | 429 | ndev->tstamp = jiffies; |
430 | 430 | addrconf_sysctl_register(ndev); |
431 | 431 | /* protected by rtnl_lock */ |
432 | - RCU_INIT_POINTER(dev->ip6_ptr, ndev); | |
432 | + rcu_assign_pointer(dev->ip6_ptr, ndev); | |
433 | 433 | |
434 | 434 | /* Join all-node multicast group */ |
435 | 435 | ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes); |
net/ipv6/ip6_tunnel.c
... | ... | @@ -218,8 +218,8 @@ |
218 | 218 | { |
219 | 219 | struct ip6_tnl __rcu **tp = ip6_tnl_bucket(ip6n, &t->parms); |
220 | 220 | |
221 | - RCU_INIT_POINTER(t->next , rtnl_dereference(*tp)); | |
222 | - RCU_INIT_POINTER(*tp, t); | |
221 | + rcu_assign_pointer(t->next , rtnl_dereference(*tp)); | |
222 | + rcu_assign_pointer(*tp, t); | |
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
... | ... | @@ -237,7 +237,7 @@ |
237 | 237 | (iter = rtnl_dereference(*tp)) != NULL; |
238 | 238 | tp = &iter->next) { |
239 | 239 | if (t == iter) { |
240 | - RCU_INIT_POINTER(*tp, t->next); | |
240 | + rcu_assign_pointer(*tp, t->next); | |
241 | 241 | break; |
242 | 242 | } |
243 | 243 | } |
... | ... | @@ -1450,7 +1450,7 @@ |
1450 | 1450 | |
1451 | 1451 | t->parms.proto = IPPROTO_IPV6; |
1452 | 1452 | dev_hold(dev); |
1453 | - RCU_INIT_POINTER(ip6n->tnls_wc[0], t); | |
1453 | + rcu_assign_pointer(ip6n->tnls_wc[0], t); | |
1454 | 1454 | return 0; |
1455 | 1455 | } |
1456 | 1456 |
net/ipv6/raw.c
net/ipv6/sit.c
... | ... | @@ -182,7 +182,7 @@ |
182 | 182 | (iter = rtnl_dereference(*tp)) != NULL; |
183 | 183 | tp = &iter->next) { |
184 | 184 | if (t == iter) { |
185 | - RCU_INIT_POINTER(*tp, t->next); | |
185 | + rcu_assign_pointer(*tp, t->next); | |
186 | 186 | break; |
187 | 187 | } |
188 | 188 | } |
... | ... | @@ -192,8 +192,8 @@ |
192 | 192 | { |
193 | 193 | struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); |
194 | 194 | |
195 | - RCU_INIT_POINTER(t->next, rtnl_dereference(*tp)); | |
196 | - RCU_INIT_POINTER(*tp, t); | |
195 | + rcu_assign_pointer(t->next, rtnl_dereference(*tp)); | |
196 | + rcu_assign_pointer(*tp, t); | |
197 | 197 | } |
198 | 198 | |
199 | 199 | static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) |
... | ... | @@ -393,7 +393,7 @@ |
393 | 393 | p->addr = a->addr; |
394 | 394 | p->flags = a->flags; |
395 | 395 | t->prl_count++; |
396 | - RCU_INIT_POINTER(t->prl, p); | |
396 | + rcu_assign_pointer(t->prl, p); | |
397 | 397 | out: |
398 | 398 | return err; |
399 | 399 | } |
... | ... | @@ -1177,7 +1177,7 @@ |
1177 | 1177 | if (!dev->tstats) |
1178 | 1178 | return -ENOMEM; |
1179 | 1179 | dev_hold(dev); |
1180 | - RCU_INIT_POINTER(sitn->tunnels_wc[0], tunnel); | |
1180 | + rcu_assign_pointer(sitn->tunnels_wc[0], tunnel); | |
1181 | 1181 | return 0; |
1182 | 1182 | } |
1183 | 1183 |
net/mac80211/agg-rx.c
... | ... | @@ -332,7 +332,7 @@ |
332 | 332 | status = WLAN_STATUS_SUCCESS; |
333 | 333 | |
334 | 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 | 337 | if (timeout) |
338 | 338 | mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); |
net/mac80211/cfg.c
... | ... | @@ -616,7 +616,7 @@ |
616 | 616 | |
617 | 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 | 621 | synchronize_rcu(); |
622 | 622 | |
... | ... | @@ -1033,7 +1033,7 @@ |
1033 | 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 | 1039 | sta->sdata = vlansdata; |
net/mac80211/ibss.c
net/mac80211/sta_info.c
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | if (!s) |
74 | 74 | return -ENOENT; |
75 | 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 | 77 | s->hnext); |
78 | 78 | return 0; |
79 | 79 | } |
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 | s = rcu_dereference_protected(s->hnext, |
84 | 84 | lockdep_is_held(&local->sta_mtx)); |
85 | 85 | if (rcu_access_pointer(s->hnext)) { |
86 | - RCU_INIT_POINTER(s->hnext, sta->hnext); | |
86 | + rcu_assign_pointer(s->hnext, sta->hnext); | |
87 | 87 | return 0; |
88 | 88 | } |
89 | 89 | |
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | { |
227 | 227 | lockdep_assert_held(&local->sta_mtx); |
228 | 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 | 232 | static void sta_unblock(struct work_struct *wk) |
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_ecache.c
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | ret = -EBUSY; |
92 | 92 | goto out_unlock; |
93 | 93 | } |
94 | - RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, new); | |
94 | + rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new); | |
95 | 95 | mutex_unlock(&nf_ct_ecache_mutex); |
96 | 96 | return ret; |
97 | 97 | |
... | ... | @@ -128,7 +128,7 @@ |
128 | 128 | ret = -EBUSY; |
129 | 129 | goto out_unlock; |
130 | 130 | } |
131 | - RCU_INIT_POINTER(net->ct.nf_expect_event_cb, new); | |
131 | + rcu_assign_pointer(net->ct.nf_expect_event_cb, new); | |
132 | 132 | mutex_unlock(&nf_ct_ecache_mutex); |
133 | 133 | return ret; |
134 | 134 |
net/netfilter/nf_conntrack_extend.c
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | before updating alloc_size */ |
170 | 170 | type->alloc_size = ALIGN(sizeof(struct nf_ct_ext), type->align) |
171 | 171 | + type->len; |
172 | - RCU_INIT_POINTER(nf_ct_ext_types[type->id], type); | |
172 | + rcu_assign_pointer(nf_ct_ext_types[type->id], type); | |
173 | 173 | update_alloc_size(type); |
174 | 174 | out: |
175 | 175 | mutex_unlock(&nf_ct_ext_type_mutex); |
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_log.c
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | llog = rcu_dereference_protected(nf_loggers[pf], |
56 | 56 | lockdep_is_held(&nf_log_mutex)); |
57 | 57 | if (llog == NULL) |
58 | - RCU_INIT_POINTER(nf_loggers[pf], logger); | |
58 | + rcu_assign_pointer(nf_loggers[pf], logger); | |
59 | 59 | } |
60 | 60 | |
61 | 61 | mutex_unlock(&nf_log_mutex); |
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | mutex_unlock(&nf_log_mutex); |
93 | 93 | return -ENOENT; |
94 | 94 | } |
95 | - RCU_INIT_POINTER(nf_loggers[pf], logger); | |
95 | + rcu_assign_pointer(nf_loggers[pf], logger); | |
96 | 96 | mutex_unlock(&nf_log_mutex); |
97 | 97 | return 0; |
98 | 98 | } |
... | ... | @@ -250,7 +250,7 @@ |
250 | 250 | mutex_unlock(&nf_log_mutex); |
251 | 251 | return -ENOENT; |
252 | 252 | } |
253 | - RCU_INIT_POINTER(nf_loggers[tindex], logger); | |
253 | + rcu_assign_pointer(nf_loggers[tindex], logger); | |
254 | 254 | mutex_unlock(&nf_log_mutex); |
255 | 255 | } else { |
256 | 256 | mutex_lock(&nf_log_mutex); |
net/netfilter/nf_queue.c
net/netfilter/nfnetlink.c
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | nfnl_unlock(); |
60 | 60 | return -EBUSY; |
61 | 61 | } |
62 | - RCU_INIT_POINTER(subsys_table[n->subsys_id], n); | |
62 | + rcu_assign_pointer(subsys_table[n->subsys_id], n); | |
63 | 63 | nfnl_unlock(); |
64 | 64 | |
65 | 65 | return 0; |
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | if (!nfnl) |
211 | 211 | return -ENOMEM; |
212 | 212 | net->nfnl_stash = nfnl; |
213 | - RCU_INIT_POINTER(net->nfnl, nfnl); | |
213 | + rcu_assign_pointer(net->nfnl, nfnl); | |
214 | 214 | return 0; |
215 | 215 | } |
216 | 216 |
net/netlabel/netlabel_domainhash.c
... | ... | @@ -282,7 +282,7 @@ |
282 | 282 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); |
283 | 283 | |
284 | 284 | spin_lock(&netlbl_domhsh_lock); |
285 | - RCU_INIT_POINTER(netlbl_domhsh, hsh_tbl); | |
285 | + rcu_assign_pointer(netlbl_domhsh, hsh_tbl); | |
286 | 286 | spin_unlock(&netlbl_domhsh_lock); |
287 | 287 | |
288 | 288 | return 0; |
... | ... | @@ -330,7 +330,7 @@ |
330 | 330 | &rcu_dereference(netlbl_domhsh)->tbl[bkt]); |
331 | 331 | } else { |
332 | 332 | INIT_LIST_HEAD(&entry->list); |
333 | - RCU_INIT_POINTER(netlbl_domhsh_def, entry); | |
333 | + rcu_assign_pointer(netlbl_domhsh_def, entry); | |
334 | 334 | } |
335 | 335 | |
336 | 336 | if (entry->type == NETLBL_NLTYPE_ADDRSELECT) { |
net/netlabel/netlabel_unlabeled.c
... | ... | @@ -354,7 +354,7 @@ |
354 | 354 | INIT_LIST_HEAD(&iface->list); |
355 | 355 | if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL) |
356 | 356 | goto add_iface_failure; |
357 | - RCU_INIT_POINTER(netlbl_unlhsh_def, iface); | |
357 | + rcu_assign_pointer(netlbl_unlhsh_def, iface); | |
358 | 358 | } |
359 | 359 | spin_unlock(&netlbl_unlhsh_lock); |
360 | 360 | |
361 | 361 | |
362 | 362 | |
... | ... | @@ -1447,11 +1447,9 @@ |
1447 | 1447 | for (iter = 0; iter < hsh_tbl->size; iter++) |
1448 | 1448 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); |
1449 | 1449 | |
1450 | - rcu_read_lock(); | |
1451 | 1450 | spin_lock(&netlbl_unlhsh_lock); |
1452 | - RCU_INIT_POINTER(netlbl_unlhsh, hsh_tbl); | |
1451 | + rcu_assign_pointer(netlbl_unlhsh, hsh_tbl); | |
1453 | 1452 | spin_unlock(&netlbl_unlhsh_lock); |
1454 | - rcu_read_unlock(); | |
1455 | 1453 | |
1456 | 1454 | register_netdevice_notifier(&netlbl_unlhsh_netdev_notifier); |
1457 | 1455 |
net/phonet/af_phonet.c
net/phonet/pn_dev.c
net/phonet/socket.c
net/socket.c
... | ... | @@ -2492,7 +2492,7 @@ |
2492 | 2492 | lockdep_is_held(&net_family_lock))) |
2493 | 2493 | err = -EEXIST; |
2494 | 2494 | else { |
2495 | - RCU_INIT_POINTER(net_families[ops->family], ops); | |
2495 | + rcu_assign_pointer(net_families[ops->family], ops); | |
2496 | 2496 | err = 0; |
2497 | 2497 | } |
2498 | 2498 | spin_unlock(&net_family_lock); |
net/sunrpc/auth_gss/auth_gss.c
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) |
123 | 123 | return; |
124 | 124 | gss_get_ctx(ctx); |
125 | - RCU_INIT_POINTER(gss_cred->gc_ctx, ctx); | |
125 | + rcu_assign_pointer(gss_cred->gc_ctx, ctx); | |
126 | 126 | set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); |
127 | 127 | smp_mb__before_clear_bit(); |
128 | 128 | clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); |
net/xfrm/xfrm_user.c