summaryrefslogtreecommitdiff
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorbob picco <bob.picco@oracle.com>2017-03-10 22:31:19 +0300
committerDavid S. Miller <davem@davemloft.net>2017-03-28 07:20:23 +0300
commitadfae8a5d833fa2b46577a8081f350e408851f5b (patch)
treee81c32dbf067fce6ea26c691a73bfcc2e078c86a /arch/sparc/mm
parent85b1da7c47052330af9485a5f5c7e54ede882e65 (diff)
downloadlinux-adfae8a5d833fa2b46577a8081f350e408851f5b.tar.xz
sparc64: kern_addr_valid regression
I encountered this bug when using /proc/kcore to examine the kernel. Plus a coworker inquired about debugging tools. We computed pa but did not use it during the maximum physical address bits test. Instead we used the identity mapped virtual address which will always fail this test. I believe the defect came in here: [bpicco@zareason linus.git]$ git describe --contains bb4e6e85daa52 v3.18-rc1~87^2~4 . Signed-off-by: Bob Picco <bob.picco@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/init_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 3328043e990c..0cda653ae007 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1567,7 +1567,7 @@ bool kern_addr_valid(unsigned long addr)
if ((long)addr < 0L) {
unsigned long pa = __pa(addr);
- if ((addr >> max_phys_bits) != 0UL)
+ if ((pa >> max_phys_bits) != 0UL)
return false;
return pfn_valid(pa >> PAGE_SHIFT);