Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73e753a50dcac7d6d4fa8b9552203ef544a70d77
Commit:     73e753a50dcac7d6d4fa8b9552203ef544a70d77
Parent:     470fd646444c65a5d062a371f5ec8dcedee61239
Author:     KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:40:47 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:44 2007 -0700

    CPU HOTPLUG: avoid hotadd when proper possible_map isn't specified
    
    cpu-hot-add should be fail if cpu is not set in cpu_possible_map.  If go
    ahead, the system will panic soon.
    
    Especially, arch which requires additional_cpus= parameter should handle
    this.  Tested on ia64.
    
    [EMAIL PROTECTED]: coding-style fixes]
    Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/cpu.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index ebf6647..6b3a0c1 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -265,6 +265,15 @@ out_notify:
 int __cpuinit cpu_up(unsigned int cpu)
 {
        int err = 0;
+       if (!cpu_isset(cpu, cpu_possible_map)) {
+               printk(KERN_ERR "can't online cpu %d because it is not "
+                       "configured as may-hotadd at boot time\n", cpu);
+#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) || defined(CONFIG_S390)
+               printk(KERN_ERR "please check additional_cpus= boot "
+                               "parameter\n");
+#endif
+               return -EINVAL;
+       }
 
        mutex_lock(&cpu_add_remove_lock);
        if (cpu_hotplug_disabled)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to