The patch titled
sparsemem fix for sparse_index_init
has been added to the -mm tree. Its filename is
sparsemem-extreme-hotplug-preparation-fix.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
sparsemem-extreme.patch
sparsemem-extreme-implementation.patch
sparsemem-extreme-hotplug-preparation-fix.patch
From: Bob Picco <[EMAIL PROTECTED]>
After reviewing recent SPARSEMEM+EXTREME changes for -mm, I spotted a
memory leak issue. In sparse_index_init we must evaluate whether the root
index is allocated before allocating, acquiring the lock and then checking
whether the root is already allocated. An alternative would be in the
error path doing a free_bootmem_node but this seems the more expensive
method for boot time.
Signed-off-by: Bob Picco <[EMAIL PROTECTED]>
Cc: Dave Hansen <[EMAIL PROTECTED]>
Cc: Andy Whitcroft <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
mm/sparse.c | 3 +++
1 files changed, 3 insertions(+)
diff -puN mm/sparse.c~sparsemem-extreme-hotplug-preparation-fix mm/sparse.c
--- devel/mm/sparse.c~sparsemem-extreme-hotplug-preparation-fix 2005-08-22
15:48:46.000000000 -0700
+++ devel-akpm/mm/sparse.c 2005-08-22 15:48:46.000000000 -0700
@@ -45,6 +45,9 @@ static int sparse_index_init(unsigned lo
struct mem_section *section;
int ret = 0;
+ if (mem_section[root])
+ return -EEXIST;
+
section = sparse_index_alloc(nid);
/*
* This lock keeps two different sections from
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html