Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Monday, August 11, 2008 - 5:30 am

* Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:


i've queued up the fix below in tip/sched/urgent.

	Ingo

------------------------>
From 3bc8fb8f85b79aa2d6341adb5090799b93d64bc9 Mon Sep 17 00:00:00 2001
From: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Date: Wed, 30 Jul 2008 12:34:04 +0200
Subject: [PATCH] sched, cpu hotplug: fix set_cpus_allowed() use in hotplug callbacks

Mark Langsdorf reported:


a similar problem also affects the microcode driver.

So set the CPU active before calling the CPU_ONLINE notifier chain,
there are a handful of notifiers that use set_cpus_allowed().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/cpu.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index e202a68..c977c33 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -349,6 +349,8 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
 		goto out_notify;
 	BUG_ON(!cpu_online(cpu));
 
+	cpu_set(cpu, cpu_active_map);
+
 	/* Now call notifier in preparation. */
 	raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
 
@@ -383,9 +385,6 @@ int __cpuinit cpu_up(unsigned int cpu)
 
 	err = _cpu_up(cpu, 0);
 
-	if (cpu_online(cpu))
-		cpu_set(cpu, cpu_active_map);
-
 out:
 	cpu_maps_update_done();
 	return err;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Langsdorf, Mark, (Fri Aug 8, 12:44 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Rafael J. Wysocki, (Fri Aug 8, 2:03 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Dmitry Adamushko, (Fri Aug 8, 2:31 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Ingo Molnar, (Mon Aug 11, 5:30 am)
RE: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Langsdorf, Mark, (Mon Aug 11, 7:01 am)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Ingo Molnar, (Mon Aug 11, 7:20 am)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Dmitry Adamushko, (Mon Aug 11, 7:28 am)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Linus Torvalds, (Mon Aug 11, 3:03 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Ingo Molnar, (Mon Aug 11, 3:10 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Max Krasnyansky, (Mon Aug 11, 3:14 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Ingo Molnar, (Mon Aug 11, 3:46 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Max Krasnyansky, (Mon Aug 11, 3:49 pm)
Re: Regression in 2.6.27-rc1 for set_cpus_allowed_ptr, Ingo Molnar, (Mon Aug 11, 3:55 pm)