|
@@ -456,6 +456,8 @@ static int __init flow_cache_init(struct flow_cache *fc)
|
|
|
if (!fc->percpu)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
+ cpu_notifier_register_begin();
|
|
|
+
|
|
|
for_each_online_cpu(i) {
|
|
|
if (flow_cache_cpu_prepare(fc, i))
|
|
|
goto err;
|
|
@@ -463,7 +465,9 @@ static int __init flow_cache_init(struct flow_cache *fc)
|
|
|
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);
|
|
@@ -479,6 +483,8 @@ err:
|
|
|
fcp->hash_table = NULL;
|
|
|
}
|
|
|
|
|
|
+ cpu_notifier_register_done();
|
|
|
+
|
|
|
free_percpu(fc->percpu);
|
|
|
fc->percpu = NULL;
|
|
|
|