From 47e636ae61d26a36314607e05c8ecd495ac8d471 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Tue, 15 Jul 2008 20:56:26 -0700 Subject: [PATCH] --- yaml --- r: 105240 b: refs/heads/master c: 39b0fad7121eace85770e7a4c6dc35dfd2879768 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/cpu.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e226cb3c0d33..45b4ae6a9a77 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e761b7725234276a802322549cee5255305a0930 +refs/heads/master: 39b0fad7121eace85770e7a4c6dc35dfd2879768 diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index a1ac7ea245d7..033603c1d7c3 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -301,6 +301,16 @@ int __ref cpu_down(unsigned int cpu) cpu_clear(cpu, cpu_active_map); + /* + * Make sure the all cpus did the reschedule and are not + * using stale version of the cpu_active_map. + * This is not strictly necessary becuase stop_machine() + * that we run down the line already provides the required + * synchronization. But it's really a side effect and we do not + * want to depend on the innards of the stop_machine here. + */ + synchronize_sched(); + err = _cpu_down(cpu, 0); if (cpu_online(cpu))