mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
[SPARC64]: Solidify check in cheetah_check_main_memory().
Need to make sure the address is below high_memory before passing it to kern_addr_valid(). Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
10147570f9
commit
ed3ffaf7b5
@ -1333,6 +1333,9 @@ static int cheetah_check_main_memory(unsigned long paddr)
|
||||
{
|
||||
unsigned long vaddr = PAGE_OFFSET + paddr;
|
||||
|
||||
if (vaddr > high_memory)
|
||||
return 0;
|
||||
|
||||
return kern_addr_valid(vaddr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user