Skip to content

Commit

Permalink
sparc64: Fix overshoot in nid_range().
Browse files Browse the repository at this point in the history
If 'start' does not begin on a page boundary, we can overshoot
past 'end'.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 14, 2008
1 parent 6f63e78 commit c918dcc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/sparc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c918dcc

Please sign in to comment.