提交 adfae8a5 编写于 作者: B bob picco 提交者: David S. Miller

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 bb4e6e85
v3.18-rc1~87^2~4
.
Signed-off-by: NBob Picco <bob.picco@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 85b1da7c
...@@ -1567,7 +1567,7 @@ bool kern_addr_valid(unsigned long addr) ...@@ -1567,7 +1567,7 @@ bool kern_addr_valid(unsigned long addr)
if ((long)addr < 0L) { if ((long)addr < 0L) {
unsigned long pa = __pa(addr); unsigned long pa = __pa(addr);
if ((addr >> max_phys_bits) != 0UL) if ((pa >> max_phys_bits) != 0UL)
return false; return false;
return pfn_valid(pa >> PAGE_SHIFT); return pfn_valid(pa >> PAGE_SHIFT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册