Skip to content

Commit

Permalink
sparc64: Fix range check in kern_addr_valid().
Browse files Browse the repository at this point in the history
In commit b2d4383 ("sparc64: Make
PAGE_OFFSET variable."), the MAX_PHYS_ADDRESS_BITS value was increased
(to 47).

This constant reference to '41UL' was missed.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 4, 2014
1 parent 70ffc6e commit ee73887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/pgtable_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ static inline bool kern_addr_valid(unsigned long addr)
{
unsigned long paddr = __pa(addr);

if ((paddr >> 41UL) != 0UL)
if ((paddr >> MAX_PHYS_ADDRESS_BITS) != 0UL)
return false;
return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
}
Expand Down

0 comments on commit ee73887

Please sign in to comment.