The patch titled memory_hotplug: check for walk_memory_resource() failure in online_pages() has been added to the -mm tree. Its filename is memory_hotplug-check-for-walk_memory_resource-failure-in-online_pages.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://www.zip.com.au/~akpm/linux/patches/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: memory_hotplug: check for walk_memory_resource() failure in online_pages() From: Geoff Levand <geoffrey.levand@xxxxxxxxxxx> Add a check to online_pages() to test for failure of walk_memory_resource(). This fixes a condition where a failure of walk_memory_resource() can lead to online_pages() returning success without the requested pages being onlined. Signed-off-by: Geoff Levand <geoffrey.levand@xxxxxxxxxxx> Cc: Yasunori Goto <y-goto@xxxxxxxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Dave Hansen <haveblue@xxxxxxxxxx> Cc: Keith Mannthey <kmannth@xxxxxxxxxx> Cc: Christoph Lameter <clameter@xxxxxxx> Cc: Paul Jackson <pj@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory_hotplug.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff -puN mm/memory_hotplug.c~memory_hotplug-check-for-walk_memory_resource-failure-in-online_pages mm/memory_hotplug.c --- a/mm/memory_hotplug.c~memory_hotplug-check-for-walk_memory_resource-failure-in-online_pages +++ a/mm/memory_hotplug.c @@ -404,8 +404,15 @@ int online_pages(unsigned long pfn, unsi if (!populated_zone(zone)) need_zonelists_rebuild = 1; - walk_memory_resource(pfn, nr_pages, &onlined_pages, + ret = walk_memory_resource(pfn, nr_pages, &onlined_pages, online_pages_range); + if (ret) { + printk(KERN_DEBUG "online_pages %lx at %lx failed\n", + nr_pages, pfn); + memory_notify(MEM_CANCEL_ONLINE, &arg); + return ret; + } + zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; _ Patches currently in -mm which might be from geoffrey.levand@xxxxxxxxxxx are memory_hotplug-check-for-walk_memory_resource-failure-in-online_pages.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