The patch titled Subject: acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed has been added to the -mm tree. Its filename is acpi_memhotplugc-free-memory-device-if-acpi_memory_enable_device-failed.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 *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wen Congyang <wency@xxxxxxxxxxxxxx> Subject: acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed If acpi_memory_enable_device() fails, acpi_memory_enable_device() will return a non-zero value, which means we fail to bind the memory device to this driver. So we should free memory device before acpi_memory_device_add() returns. Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> Cc: Len Brown <lenb@xxxxxxxxxx> Cc: "Brown, Len" <len.brown@xxxxxxxxx> Cc: Yasuaki ISIMATU <isimatu.yasuaki@xxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/acpi/acpi_memhotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/acpi/acpi_memhotplug.c~acpi_memhotplugc-free-memory-device-if-acpi_memory_enable_device-failed drivers/acpi/acpi_memhotplug.c --- a/drivers/acpi/acpi_memhotplug.c~acpi_memhotplugc-free-memory-device-if-acpi_memory_enable_device-failed +++ a/drivers/acpi/acpi_memhotplug.c @@ -478,9 +478,11 @@ static int acpi_memory_device_add(struct if (!acpi_memory_check_device(mem_device)) { /* call add_memory func */ result = acpi_memory_enable_device(mem_device); - if (result) + if (result) { printk(KERN_ERR PREFIX "Error in acpi_memory_enable_device\n"); + acpi_memory_device_free(mem_device); + } } return result; } _ Subject: Subject: acpi_memhotplug.c: free memory device if acpi_memory_enable_device() failed Patches currently in -mm which might be from wency@xxxxxxxxxxxxxx are mm-memory_hotplugc-release-memory-resources-if-hotadd_new_pgdat-fails.patch acpi_memhotplugc-fix-memory-leak-when-memory-device-is-unbound-from-the-module-acpi_memhotplug.patch acpi_memhotplugc-free-memory-device-if-acpi_memory_enable_device-failed.patch acpi_memhotplugc-remove-memory-info-from-list-before-freeing-it.patch acpi_memhotplugc-dont-allow-to-eject-the-memory-device-if-it-is-being-used.patch acpi_memhotplugc-bind-the-memory-device-when-the-driver-is-being-loaded.patch acpi_memhotplugc-auto-bind-the-memory-device-which-is-hotplugged-before-the-driver-is-loaded.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