Commit a67cc9aa authored by Max Filippov's avatar Max Filippov Committed by Chris Zankel

xtensa: fix preemption in {clear,copy}_user_highpage

Disabling pagefault makes little sense there, preemption disabling is
what was meant.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 362014c8
...@@ -97,11 +97,11 @@ void clear_user_highpage(struct page *page, unsigned long vaddr) ...@@ -97,11 +97,11 @@ void clear_user_highpage(struct page *page, unsigned long vaddr)
unsigned long paddr; unsigned long paddr;
void *kvaddr = coherent_kvaddr(page, TLBTEMP_BASE_1, vaddr, &paddr); void *kvaddr = coherent_kvaddr(page, TLBTEMP_BASE_1, vaddr, &paddr);
pagefault_disable(); preempt_disable();
kmap_invalidate_coherent(page, vaddr); kmap_invalidate_coherent(page, vaddr);
set_bit(PG_arch_1, &page->flags); set_bit(PG_arch_1, &page->flags);
clear_page_alias(kvaddr, paddr); clear_page_alias(kvaddr, paddr);
pagefault_enable(); preempt_enable();
} }
void copy_user_highpage(struct page *dst, struct page *src, void copy_user_highpage(struct page *dst, struct page *src,
...@@ -113,11 +113,11 @@ void copy_user_highpage(struct page *dst, struct page *src, ...@@ -113,11 +113,11 @@ void copy_user_highpage(struct page *dst, struct page *src,
void *src_vaddr = coherent_kvaddr(src, TLBTEMP_BASE_2, vaddr, void *src_vaddr = coherent_kvaddr(src, TLBTEMP_BASE_2, vaddr,
&src_paddr); &src_paddr);
pagefault_disable(); preempt_disable();
kmap_invalidate_coherent(dst, vaddr); kmap_invalidate_coherent(dst, vaddr);
set_bit(PG_arch_1, &dst->flags); set_bit(PG_arch_1, &dst->flags);
copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr); copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr);
pagefault_enable(); preempt_enable();
} }
#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */ #endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
......
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