浏览代码

parisc: Extend disabled preemption in copy_user_page

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@bell.net>
Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Helge Deller <deller@gmx.de>
John David Anglin 8 年之前
父节点
当前提交
56008c04eb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/parisc/kernel/cache.c

+ 1 - 1
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);