summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-02-29 09:19:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-12 07:33:15 -0700
commitff3555af94db5bae35932dfdfc28541ee1cb76a8 (patch)
treedce4061e065cf8a0e4261643806c67f908c0edf4 /arch/sh
parentaab265efebfab78ba49e76c4bc77da87fd576134 (diff)
downloadlwn-ff3555af94db5bae35932dfdfc28541ee1cb76a8.tar.gz
lwn-ff3555af94db5bae35932dfdfc28541ee1cb76a8.zip
sched/preempt, sh: kmap_coherent relies on disabled preemption
commit b15d53d009558d14c4f394a6d1fa2039c7f45c43 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/mm/kmap.c2
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)
BUG_ON(!test_bit(PG_dcache_clean, &page->flags));
+ preempt_disable();
pagefault_disable();
idx = FIX_CMAP_END -
@@ -64,4 +65,5 @@ void kunmap_coherent(void *kvaddr)
}
pagefault_enable();
+ preempt_enable();
}