diff options
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index a1ac7ea245d7..033603c1d7c3 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -301,6 +301,16 @@ int __ref cpu_down(unsigned int cpu) | |||
301 | 301 | ||
302 | cpu_clear(cpu, cpu_active_map); | 302 | cpu_clear(cpu, cpu_active_map); |
303 | 303 | ||
304 | /* | ||
305 | * Make sure the all cpus did the reschedule and are not | ||
306 | * using stale version of the cpu_active_map. | ||
307 | * This is not strictly necessary becuase stop_machine() | ||
308 | * that we run down the line already provides the required | ||
309 | * synchronization. But it's really a side effect and we do not | ||
310 | * want to depend on the innards of the stop_machine here. | ||
311 | */ | ||
312 | synchronize_sched(); | ||
313 | |||
304 | err = _cpu_down(cpu, 0); | 314 | err = _cpu_down(cpu, 0); |
305 | 315 | ||
306 | if (cpu_online(cpu)) | 316 | if (cpu_online(cpu)) |