[PATCH] parisc: Extend disabled preemption in copy_user_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <dave.anglin@xxxxxxxx>


diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index c32a09095216..85a92db70afc 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);
 

--
John David Anglin	dave.anglin@xxxxxxxx

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux