lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 28 Sep 2007 15:58:53 +0900 From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> To: LKML <linux-kernel@...r.kernel.org> Cc: Andrew Morton <akpm@...ux-foundation.org> Subject: [PATCH] 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. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> --- kernel/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: linux-2.6.23-rc8-mm2/kernel/cpu.c =================================================================== --- linux-2.6.23-rc8-mm2.orig/kernel/cpu.c +++ linux-2.6.23-rc8-mm2/kernel/cpu.c @@ -265,6 +265,14 @@ out_notify: int __cpuinit cpu_up(unsigned int cpu) { int err = 0; + if (!cpu_isset(cpu, cpu_possible_map)) { + printk("can't online cpu %d because it is not configured " + "as may-hotadded at boot time\n", cpu); +#if defined(CONFIG_IA64) || defined (CONFIG_X86_64) || defined(CONFIG_S390) + printk("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 linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists