sparc64: Fix overshoot in nid_range().

If 'start' does not begin on a page boundary, we can overshoot
past 'end'.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2008-08-14 01:41:39 -07:00
parent 6f63e781ea
commit c918dcce92
1 changed files with 3 additions and 0 deletions

View File

@ -796,6 +796,9 @@ static unsigned long nid_range(unsigned long start, unsigned long end,
start += PAGE_SIZE;
}
if (start > end)
start = end;
return start;
}
#else