diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2016-02-29 03:19:24 -0500 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2016-03-17 15:46:14 -0400 |
commit | b15d53d009558d14c4f394a6d1fa2039c7f45c43 (patch) | |
tree | 05bc99e55e9192e0d35aeb26200251442ed2a4d2 /arch/sh | |
parent | 044b81f872169e9549b47ea2b6c94491e6d5f305 (diff) |
sched/preempt, sh: kmap_coherent relies on disabled preemption
kmap_coherent needs disabled preemption to not schedule in the critical
section, just like kmap_coherent on mips and kmap_atomic in general.
Fixes: 8222dbe21e79 "sched/preempt, mm/fault: Decouple preemption from the page fault logic"
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/mm/kmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c index ec29e14ec5a8..bf25d7c79a2d 100644 --- a/arch/sh/mm/kmap.c +++ b/arch/sh/mm/kmap.c | |||
@@ -36,6 +36,7 @@ void *kmap_coherent(struct page *page, unsigned long addr) | |||
36 | 36 | ||
37 | BUG_ON(!test_bit(PG_dcache_clean, &page->flags)); | 37 | BUG_ON(!test_bit(PG_dcache_clean, &page->flags)); |
38 | 38 | ||
39 | preempt_disable(); | ||
39 | pagefault_disable(); | 40 | pagefault_disable(); |
40 | 41 | ||
41 | idx = FIX_CMAP_END - | 42 | idx = FIX_CMAP_END - |
@@ -64,4 +65,5 @@ void kunmap_coherent(void *kvaddr) | |||
64 | } | 65 | } |
65 | 66 | ||
66 | pagefault_enable(); | 67 | pagefault_enable(); |
68 | preempt_enable(); | ||
67 | } | 69 | } |