Re: [PATCH 50/51] net/core/flow.c: Fix CPU hotplug callback registration

2014-02-06 Thread David Miller
From: David Miller Date: Thu, 06 Feb 2014 20:39:21 -0800 (PST) > From: "Srivatsa S. Bhat" > Date: Thu, 06 Feb 2014 03:43:46 +0530 > >> Subsystems that want to register CPU hotplug callbacks, as well as perform >> initialization for the CPUs that are already online, often do it as shown >> below

Re: [PATCH 50/51] net/core/flow.c: Fix CPU hotplug callback registration

2014-02-06 Thread David Miller
From: "Srivatsa S. Bhat" Date: Thu, 06 Feb 2014 03:43:46 +0530 > Subsystems that want to register CPU hotplug callbacks, as well as perform > initialization for the CPUs that are already online, often do it as shown > below: ... > This is wrong, since it is prone to ABBA deadlocks involving the

[PATCH 50/51] net/core/flow.c: Fix CPU hotplug callback registration

2014-02-05 Thread Srivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu); register_cpu_notifier(&foobar_cpu_notifie