summaryrefslogtreecommitdiff
path: root/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 64b8ed3cc8ea..84e78a6560bc 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -124,6 +124,15 @@ int cpu_down(unsigned int cpu)
goto out;
}
+ err = notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE,
+ (void *)(long)cpu);
+ if (err == NOTIFY_BAD) {
+ printk("%s: attempt to take down CPU %u failed\n",
+ __FUNCTION__, cpu);
+ err = -EINVAL;
+ goto out;
+ }
+
/* Ensure that we are not runnable on dying cpu */
old_allowed = current->cpus_allowed;
tmp = CPU_MASK_ALL;