aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 17:55:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 17:55:46 -0400
commit467a9e1633043810259a7f5368fbcc1e84746137 (patch)
treec8a5bfd2a65455d7f6a59b312e348e069375bd9b /net/core
parentb8780c363d808a726a34793caa900923d32b6b80 (diff)
parenta0e247a8059223593f9c5c3d5c1fd50eedf415c0 (diff)
Merge tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull CPU hotplug notifiers registration fixes from Rafael Wysocki: "The purpose of this single series of commits from Srivatsa S Bhat (with a small piece from Gautham R Shenoy) touching multiple subsystems that use CPU hotplug notifiers is to provide a way to register them that will not lead to deadlocks with CPU online/offline operations as described in the changelog of commit 93ae4f978ca7f ("CPU hotplug: Provide lockless versions of callback registration functions"). The first three commits in the series introduce the API and document it and the rest simply goes through the users of CPU hotplug notifiers and converts them to using the new method" * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits) net/iucv/iucv.c: Fix CPU hotplug callback registration net/core/flow.c: Fix CPU hotplug callback registration mm, zswap: Fix CPU hotplug callback registration mm, vmstat: Fix CPU hotplug callback registration profile: Fix CPU hotplug callback registration trace, ring-buffer: Fix CPU hotplug callback registration xen, balloon: Fix CPU hotplug callback registration hwmon, via-cputemp: Fix CPU hotplug callback registration hwmon, coretemp: Fix CPU hotplug callback registration thermal, x86-pkg-temp: Fix CPU hotplug callback registration octeon, watchdog: Fix CPU hotplug callback registration oprofile, nmi-timer: Fix CPU hotplug callback registration intel-idle: Fix CPU hotplug callback registration clocksource, dummy-timer: Fix CPU hotplug callback registration drivers/base/topology.c: Fix CPU hotplug callback registration acpi-cpufreq: Fix CPU hotplug callback registration zsmalloc: Fix CPU hotplug callback registration scsi, fcoe: Fix CPU hotplug callback registration scsi, bnx2fc: Fix CPU hotplug callback registration scsi, bnx2i: Fix CPU hotplug callback registration ...
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/core/flow.c b/net/core/flow.c
index 31cfb365e0c6..a0348fde1fdf 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -455,6 +455,8 @@ int flow_cache_init(struct net *net)
455 if (!fc->percpu) 455 if (!fc->percpu)
456 return -ENOMEM; 456 return -ENOMEM;
457 457
458 cpu_notifier_register_begin();
459
458 for_each_online_cpu(i) { 460 for_each_online_cpu(i) {
459 if (flow_cache_cpu_prepare(fc, i)) 461 if (flow_cache_cpu_prepare(fc, i))
460 goto err; 462 goto err;
@@ -462,7 +464,9 @@ int flow_cache_init(struct net *net)
462 fc->hotcpu_notifier = (struct notifier_block){ 464 fc->hotcpu_notifier = (struct notifier_block){
463 .notifier_call = flow_cache_cpu, 465 .notifier_call = flow_cache_cpu,
464 }; 466 };
465 register_hotcpu_notifier(&fc->hotcpu_notifier); 467 __register_hotcpu_notifier(&fc->hotcpu_notifier);
468
469 cpu_notifier_register_done();
466 470
467 setup_timer(&fc->rnd_timer, flow_cache_new_hashrnd, 471 setup_timer(&fc->rnd_timer, flow_cache_new_hashrnd,
468 (unsigned long) fc); 472 (unsigned long) fc);
@@ -478,6 +482,8 @@ err:
478 fcp->hash_table = NULL; 482 fcp->hash_table = NULL;
479 } 483 }
480 484
485 cpu_notifier_register_done();
486
481 free_percpu(fc->percpu); 487 free_percpu(fc->percpu);
482 fc->percpu = NULL; 488 fc->percpu = NULL;
483 489