sparc64: Fix overshoot in nid_range().
authorDavid S. Miller <davem@davemloft.net>
Thu, 14 Aug 2008 08:41:39 +0000 (01:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Aug 2008 08:41:39 +0000 (01:41 -0700)
If 'start' does not begin on a page boundary, we can overshoot
past 'end'.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/mm/init.c

index 217de3e..64d8e76 100644 (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