From: John David Anglin Date: Tue, 25 Jul 2017 21:23:35 +0000 (-0400) Subject: parisc: Extend disabled preemption in copy_user_page X-Git-Tag: v4.12.5~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70f8efda5a9e473c4663ff1a9b3a783f88db3918;p=thirdparty%2Fkernel%2Fstable.git parisc: Extend disabled preemption in copy_user_page commit 56008c04ebc099940021b714da2d7779117cf6a7 upstream. It's always bothered me that we only disable preemption in copy_user_page around the call to flush_dcache_page_asm. This patch extends this to after the copy. Signed-off-by: John David Anglin Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 3a64ebb39ac71..85a92db70afc9 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -453,8 +453,8 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, before it can be accessed through the kernel mapping. */ preempt_disable(); flush_dcache_page_asm(__pa(vfrom), vaddr); - preempt_enable(); copy_page_asm(vto, vfrom); + preempt_enable(); } EXPORT_SYMBOL(copy_user_page);