Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13466c8419c3ab3ccd5e905eef53ca49c6c201be Commit: 13466c8419c3ab3ccd5e905eef53ca49c6c201be Parent: 6cd8fa87fbf31b2ab77b8aaec497e7f6a3757578 Author: Yasunori Goto <[EMAIL PROTECTED]> AuthorDate: Fri Jun 1 00:46:53 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Fri Jun 1 08:18:29 2007 -0700
memory hotplug: fix unnecessary calling of init_currenty_empty_zone() zone->present_pages is updated in online_pages(). But, __add_zone() can be called twice or more before calling online_pages(). So, init_currenty_empty_zone() can be called unnecessary times. It is cause of memory leak of zone's wait_table. Signed-off-by: Yasunori Goto <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/memory_hotplug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 8427912..df9d554 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -65,7 +65,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) int zone_type; zone_type = zone - pgdat->node_zones; - if (!populated_zone(zone)) { + if (!zone->wait_table) { int ret = 0; ret = init_currently_empty_zone(zone, phys_start_pfn, nr_pages, MEMMAP_HOTPLUG); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html