提交 06f862c8 编写于 作者: P Paul Mundt

sh: Fix pgd mismatch from cached TTB in unhandled fault.

When reading the cached TTB value and extracting the pgd, we
accidentally applied a __va() to it and bumped it off in to bogus
space which ended up causing multiple faults in the error path.

Fix it up so unhandled faults don't do strange and highly unorthodox
things when oopsing.
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 56c74c73
......@@ -184,8 +184,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
printk(KERN_ALERT "pc = %08lx\n", regs->pc);
page = (unsigned long)get_TTB();
if (page) {
page = ((__typeof__(page) *) __va(page))[address >>
PGDIR_SHIFT];
page = ((__typeof__(page) *)page)[address >> PGDIR_SHIFT];
printk(KERN_ALERT "*pde = %08lx\n", page);
if (page & _PAGE_PRESENT) {
page &= PAGE_MASK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册