[patch 0/2] bootmem: Fix node-setup agnostic free_bootmem()

From: Johannes Weiner
Date: Sun Apr 13 2008 - 06:36:24 EST


[the first send didn't make it to lkml, so here it is again]

Hi,

as I was doing some clean-ups in the bootmem allocator, I noticed the
patch

5a982cbc7b3fe6cf72266f319286f29963c71b9e
mm: fix boundary checking in free_bootmem_core

which seems to implement the opposite of what the subject promises.

It makes input arguments acceptable if they are `a bit wrong' and
silently aborts if they are completely off the whack.

Please have a look at the two patches I propose: one to revert the
original and the other one to reimplement what the whole thing was
really about: having free_bootmem() itself look up the node holding
the specified address range.

Note also that the reverted patch changed a helper function and
therefore also affected free_bootmem_node(), making the latter paper
over bugs as well.

Hannes

Original version:

mm/bootmem.c | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)

New version:

bootmem.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--
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/