diff options
Diffstat (limited to 'net/netlabel')
-rw-r--r-- | net/netlabel/netlabel_domainhash.c | 4 | ||||
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index 38204112b9f4..d8d424337550 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -282,7 +282,7 @@ int __init netlbl_domhsh_init(u32 size) | |||
282 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); | 282 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); |
283 | 283 | ||
284 | spin_lock(&netlbl_domhsh_lock); | 284 | spin_lock(&netlbl_domhsh_lock); |
285 | RCU_INIT_POINTER(netlbl_domhsh, hsh_tbl); | 285 | rcu_assign_pointer(netlbl_domhsh, hsh_tbl); |
286 | spin_unlock(&netlbl_domhsh_lock); | 286 | spin_unlock(&netlbl_domhsh_lock); |
287 | 287 | ||
288 | return 0; | 288 | return 0; |
@@ -330,7 +330,7 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
330 | &rcu_dereference(netlbl_domhsh)->tbl[bkt]); | 330 | &rcu_dereference(netlbl_domhsh)->tbl[bkt]); |
331 | } else { | 331 | } else { |
332 | INIT_LIST_HEAD(&entry->list); | 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 | if (entry->type == NETLBL_NLTYPE_ADDRSELECT) { | 336 | if (entry->type == NETLBL_NLTYPE_ADDRSELECT) { |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 4b5fa0fe78fd..e7ff694f1049 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -354,7 +354,7 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex) | |||
354 | INIT_LIST_HEAD(&iface->list); | 354 | INIT_LIST_HEAD(&iface->list); |
355 | if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL) | 355 | if (netlbl_unlhsh_rcu_deref(netlbl_unlhsh_def) != NULL) |
356 | goto add_iface_failure; | 356 | goto add_iface_failure; |
357 | RCU_INIT_POINTER(netlbl_unlhsh_def, iface); | 357 | rcu_assign_pointer(netlbl_unlhsh_def, iface); |
358 | } | 358 | } |
359 | spin_unlock(&netlbl_unlhsh_lock); | 359 | spin_unlock(&netlbl_unlhsh_lock); |
360 | 360 | ||
@@ -1447,11 +1447,9 @@ int __init netlbl_unlabel_init(u32 size) | |||
1447 | for (iter = 0; iter < hsh_tbl->size; iter++) | 1447 | for (iter = 0; iter < hsh_tbl->size; iter++) |
1448 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); | 1448 | INIT_LIST_HEAD(&hsh_tbl->tbl[iter]); |
1449 | 1449 | ||
1450 | rcu_read_lock(); | ||
1451 | spin_lock(&netlbl_unlhsh_lock); | 1450 | spin_lock(&netlbl_unlhsh_lock); |
1452 | RCU_INIT_POINTER(netlbl_unlhsh, hsh_tbl); | 1451 | rcu_assign_pointer(netlbl_unlhsh, hsh_tbl); |
1453 | spin_unlock(&netlbl_unlhsh_lock); | 1452 | spin_unlock(&netlbl_unlhsh_lock); |
1454 | rcu_read_unlock(); | ||
1455 | 1453 | ||
1456 | register_netdevice_notifier(&netlbl_unlhsh_netdev_notifier); | 1454 | register_netdevice_notifier(&netlbl_unlhsh_netdev_notifier); |
1457 | 1455 | ||