提交 b15d53d0 编写于 作者: D David Hildenbrand 提交者: Rich Felker

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: 8222dbe2 "sched/preempt, mm/fault: Decouple preemption from the page fault logic"
Reported-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tested-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NRich Felker <dalias@libc.org>
上级 044b81f8
......@@ -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();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册