mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
sched/preempt, sh: kmap_coherent relies on disabled preemption
commitb15d53d009upstream. kmap_coherent needs disabled preemption to not schedule in the critical section, just like kmap_coherent on mips and kmap_atomic in general. Fixes:8222dbe21e"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>
This commit is contained in:
parent
af080e5802
commit
10595c57f4
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user