Re: [RFC] hotplug, memory: move register_memory_resource out of thelock_memory_hotplug

From: David Rientjes
Date: Tue Jan 14 2014 - 20:05:55 EST


On Tue, 14 Jan 2014, Andrew Morton wrote:

> From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Subject: mm/memory_hotplug.c: register_memory_resource() fixes
>
> - register_memory_resource() should not go BUG on ENOMEM. That's
> appropriate at system boot time, but not at memory-hotplug time. Fix.
>
> - register_memory_resource()'s caller is incorrectly replacing
> request_resource()'s -EBUSY with -EEXIST. Fix this by propagating
> errors appropriately.
>

Unfortunately, -EEXIST is a special case return value for both
acpi_memory_enable_device() and hv_mem_hot_add(), so they would need to be
modified to agree concurrently with this change.
--
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/