diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-14 01:41:39 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-14 01:41:39 -0700 |
commit | c918dcce92f76bb9903e4d049f4780bad384c207 (patch) | |
tree | 98cba34aec05883f1c25aa19c2a8600e4a588341 /arch/sparc64 | |
parent | 6f63e781eaf6a741fc65f773017154b20ed4ce3b (diff) | |
download | kernel_samsung_smdk4412-c918dcce92f76bb9903e4d049f4780bad384c207.zip kernel_samsung_smdk4412-c918dcce92f76bb9903e4d049f4780bad384c207.tar.gz kernel_samsung_smdk4412-c918dcce92f76bb9903e4d049f4780bad384c207.tar.bz2 |
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>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/mm/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 217de3e..64d8e76 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -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 |