]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/core/flow.c
Merge tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-artful-kernel.git] / net / core / flow.c
index 31cfb365e0c689ffa528bf2f96072c6bcbc82799..a0348fde1fdfe89844352702565d35ef8d706f24 100644 (file)
@@ -455,6 +455,8 @@ int flow_cache_init(struct net *net)
        if (!fc->percpu)
                return -ENOMEM;
 
+       cpu_notifier_register_begin();
+
        for_each_online_cpu(i) {
                if (flow_cache_cpu_prepare(fc, i))
                        goto err;
@@ -462,7 +464,9 @@ int flow_cache_init(struct net *net)
        fc->hotcpu_notifier = (struct notifier_block){
                .notifier_call = flow_cache_cpu,
        };
-       register_hotcpu_notifier(&fc->hotcpu_notifier);
+       __register_hotcpu_notifier(&fc->hotcpu_notifier);
+
+       cpu_notifier_register_done();
 
        setup_timer(&fc->rnd_timer, flow_cache_new_hashrnd,
                    (unsigned long) fc);
@@ -478,6 +482,8 @@ err:
                fcp->hash_table = NULL;
        }
 
+       cpu_notifier_register_done();
+
        free_percpu(fc->percpu);
        fc->percpu = NULL;