[PATCH] fix off-by-one in mem_init()

Dave Hansen haveblue at us.ibm.com
Thu Jul 1 07:36:51 EST 2004


lmb_end_of_DRAM() returns the address of the end of RAM, not the
starting address of the last page.  We've been accessing mem_map[] out
of bounds for quite a while.  But, it's just a read, so it's probably
never caused a real problem.

But, during my port of CONFIG_NONLINEAR to ppc64, I have a check to make
sure that all __va() calls are given with valid physical addresses.
This code tripped that check.

-- Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc64-lt-end_of_DRAM.patch
Type: text/x-patch
Size: 398 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20040630/ea8a9e30/attachment.bin 


More information about the Linuxppc64-dev mailing list