Commit f28cde07 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Fix an oops that could happen if ptrace caused a page fault.

We were using the virtual address for cache flushing in
update_mmu_cache, which is ok if the address is in the current mm,
but if it isn't we have to do something different, namely,
flush using the physical address.
parent 7ed8c6e9
......@@ -601,7 +601,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
struct page *page = pfn_to_page(pfn);
if (!PageReserved(page)
&& !test_bit(PG_arch_1, &page->flags)) {
__flush_dcache_icache((void *) address);
if (vma->vm_mm == current->active_mm)
__flush_dcache_icache((void *) address);
else
__flush_dcache_icache_phys(pfn << PAGE_SHIFT);
set_bit(PG_arch_1, &page->flags);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment