aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index d00a9034cb5f..2a233ffcf618 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -123,7 +123,7 @@ static void netlink_destroy_callback(struct netlink_callback *cb);
123static DEFINE_RWLOCK(nl_table_lock); 123static DEFINE_RWLOCK(nl_table_lock);
124static atomic_t nl_table_users = ATOMIC_INIT(0); 124static atomic_t nl_table_users = ATOMIC_INIT(0);
125 125
126static struct notifier_block *netlink_chain; 126static ATOMIC_NOTIFIER_HEAD(netlink_chain);
127 127
128static u32 netlink_group_mask(u32 group) 128static u32 netlink_group_mask(u32 group)
129{ 129{
@@ -469,7 +469,8 @@ static int netlink_release(struct socket *sock)
469 .protocol = sk->sk_protocol, 469 .protocol = sk->sk_protocol,
470 .pid = nlk->pid, 470 .pid = nlk->pid,
471 }; 471 };
472 notifier_call_chain(&netlink_chain, NETLINK_URELEASE, &n); 472 atomic_notifier_call_chain(&netlink_chain,
473 NETLINK_URELEASE, &n);
473 } 474 }
474 475
475 if (nlk->module) 476 if (nlk->module)
@@ -1695,12 +1696,12 @@ static struct file_operations netlink_seq_fops = {
1695 1696
1696int netlink_register_notifier(struct notifier_block *nb) 1697int netlink_register_notifier(struct notifier_block *nb)
1697{ 1698{
1698 return notifier_chain_register(&netlink_chain, nb); 1699 return atomic_notifier_chain_register(&netlink_chain, nb);
1699} 1700}
1700 1701
1701int netlink_unregister_notifier(struct notifier_block *nb) 1702int netlink_unregister_notifier(struct notifier_block *nb)
1702{ 1703{
1703 return notifier_chain_unregister(&netlink_chain, nb); 1704 return atomic_notifier_chain_unregister(&netlink_chain, nb);
1704} 1705}
1705 1706
1706static const struct proto_ops netlink_ops = { 1707static const struct proto_ops netlink_ops = {