Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24870a79 authored by bob picco's avatar bob picco Committed by Greg Kroah-Hartman
Browse files

sparc64: kern_addr_valid regression



[ Upstream commit adfae8a5d833fa2b46577a8081f350e408851f5b ]

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 bb4e6e85
v3.18-rc1~87^2~4
.

Signed-off-by: default avatarBob Picco <bob.picco@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e88a8e0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,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);