Commit 98a51ec0 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[DECNET]: Fix initialization race.

Decnet exposes itself to proc and packets before it has finished initializing.
This was always a race, but the notifier replay might expose it worse.
parent 2b165d7b
......@@ -2363,17 +2363,16 @@ static int __init decnet_init(void)
if (!dn_sk_cachep)
return -ENOMEM;
sock_register(&dn_family_ops);
dev_add_pack(&dn_dix_packet_type);
register_netdevice_notifier(&dn_dev_notifier);
proc_net_fops_create("decnet", S_IRUGO, &dn_socket_seq_fops);
dn_neigh_init();
dn_dev_init();
dn_route_init();
dn_fib_init();
sock_register(&dn_family_ops);
dev_add_pack(&dn_dix_packet_type);
register_netdevice_notifier(&dn_dev_notifier);
proc_net_fops_create("decnet", S_IRUGO, &dn_socket_seq_fops);
dn_register_sysctl();
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment