The patch titled cpu_up: hold zonelists_mutex when build_all_zonelists has been added to the -mm tree. Its filename is mem-hotplug-fix-potential-race-while-building-zonelist-for-new-populated-zone-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: cpu_up: hold zonelists_mutex when build_all_zonelists From: Haicheng Li <haicheng.li@xxxxxxxxxxxxxxx> We should always hold zonelists_mutex when calling build_all_zonelists unless system_state == SYSTEM_BOOTING. Signed-off-by: Haicheng Li <haicheng.li@xxxxxxxxxxxxxxx> Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: Andi Kleen <andi.kleen@xxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/cpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN kernel/cpu.c~mem-hotplug-fix-potential-race-while-building-zonelist-for-new-populated-zone-fix kernel/cpu.c --- a/kernel/cpu.c~mem-hotplug-fix-potential-race-while-building-zonelist-for-new-populated-zone-fix +++ a/kernel/cpu.c @@ -357,8 +357,11 @@ int __cpuinit cpu_up(unsigned int cpu) return -ENOMEM; } - if (pgdat->node_zonelists->_zonerefs->zone == NULL) + if (pgdat->node_zonelists->_zonerefs->zone == NULL) { + mutex_lock(&zonelists_mutex); build_all_zonelists(NULL); + mutex_unlock(&zonelists_mutex); + } #endif cpu_maps_update_begin(); _ Patches currently in -mm which might be from haicheng.li@xxxxxxxxxxxxxxx are mem-hotplug-separate-setup_per_cpu_pageset-into-separate-functions.patch mem-hotplug-avoid-multiple-zones-sharing-same-boot-strapping-boot_pageset.patch mem-hotplug-avoid-multiple-zones-sharing-same-boot-strapping-boot_pageset-fix.patch mem-hotplug-fix-potential-race-while-building-zonelist-for-new-populated-zone.patch mem-hotplug-fix-potential-race-while-building-zonelist-for-new-populated-zone-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html