Re: [PATCH v2] memory-hotplug: add automatic onlining policy for the newly added memory

From: David Vrabel
Date: Mon Jan 04 2016 - 06:23:30 EST


On 22/12/15 16:32, Vitaly Kuznetsov wrote:
> @@ -1292,6 +1304,11 @@ int __ref add_memory_resource(int nid, struct resource *res)
> /* create new memmap entry */
> firmware_map_add_hotplug(start, start + size, "System RAM");
>
> + /* online pages if requested */
> + if (online)
> + online_pages(start >> PAGE_SHIFT, size >> PAGE_SHIFT,
> + MMOP_ONLINE_KEEP);

This will cause the Xen balloon driver to deadlock because it calls
add_memory_resource() with the balloon_mutex locked and the online page
callback also locks the balloon_mutex.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/