]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.41/parisc-extend-disabled-preemption-in-copy_user_page.patch
Linux 5.1.6
[thirdparty/kernel/stable-queue.git] / releases / 4.9.41 / parisc-extend-disabled-preemption-in-copy_user_page.patch
1 From 56008c04ebc099940021b714da2d7779117cf6a7 Mon Sep 17 00:00:00 2001
2 From: John David Anglin <dave.anglin@bell.net>
3 Date: Tue, 25 Jul 2017 17:23:35 -0400
4 Subject: parisc: Extend disabled preemption in copy_user_page
5
6 From: John David Anglin <dave.anglin@bell.net>
7
8 commit 56008c04ebc099940021b714da2d7779117cf6a7 upstream.
9
10 It's always bothered me that we only disable preemption in
11 copy_user_page around the call to flush_dcache_page_asm.
12 This patch extends this to after the copy.
13
14 Signed-off-by: John David Anglin <dave.anglin@bell.net>
15 Signed-off-by: Helge Deller <deller@gmx.de>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 arch/parisc/kernel/cache.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/arch/parisc/kernel/cache.c
23 +++ b/arch/parisc/kernel/cache.c
24 @@ -452,8 +452,8 @@ void copy_user_page(void *vto, void *vfr
25 before it can be accessed through the kernel mapping. */
26 preempt_disable();
27 flush_dcache_page_asm(__pa(vfrom), vaddr);
28 - preempt_enable();
29 copy_page_asm(vto, vfrom);
30 + preempt_enable();
31 }
32 EXPORT_SYMBOL(copy_user_page);
33