The patch titled Subject: driver/base/node,c: remove unnecessary kfree of node struct from unregister_one_node has been added to the -mm tree. Its filename is driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.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: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Subject: driver/base/node,c: remove unnecessary kfree of node struct from unregister_one_node Commit 92d585ef067d ("numa: fix NULL pointer access and memory leak in unregister_one_node()") added kfree() of node struct in unregister_one_node(). But node struct is freed by node_device_release() which is called in unregister_node(). So by adding the kfree(), node struct is freed two times. While hot removing memory, the commit leads the following BUG_ON(): kernel BUG at mm/slub.c:3346! invalid opcode: 0000 [#1] SMP [...] Call Trace: [...] unregister_one_node [...] try_offline_node [...] remove_memory [...] acpi_memory_device_remove [...] acpi_bus_trim [...] acpi_bus_trim [...] acpi_device_hotplug [...] acpi_hotplug_work_fn [...] process_one_work [...] worker_thread [...] ? rescuer_thread [...] kthread [...] ? kthread_create_on_node [...] ret_from_fork [...] ? kthread_create_on_node This patch removes unnecessary kfree() from unregister_one_node(). Fixes: 92d585ef067d "numa: fix NULL pointer access and memory leak in unregister_one_node()" Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Cc: Xishi Qiu <qiuxishi@xxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> [3.16+] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/base/node.c | 1 - 1 file changed, 1 deletion(-) diff -puN drivers/base/node.c~driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node drivers/base/node.c --- a/drivers/base/node.c~driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node +++ a/drivers/base/node.c @@ -600,7 +600,6 @@ void unregister_one_node(int nid) return; unregister_node(node_devices[nid]); - kfree(node_devices[nid]); node_devices[nid] = NULL; } _ Patches currently in -mm which might be from isimatu.yasuaki@xxxxxxxxxxxxxx are memory-hotplug-add-sysfs-zones_online_to-attribute.patch memory-hotplug-add-sysfs-zones_online_to-attribute-fix-3.patch memory-hotplug-add-sysfs-zones_online_to-attribute-fix-4.patch driver-firmware-memmap-dont-create-memmap-sysfs-of-same-firmware_map_entry.patch linux-next.patch driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.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