[4.2.y-ckt stable] Patch "sched/preempt, sh: kmap_coherent relies on disabled preemption" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Wed Mar 30 23:54:43 UTC 2016
This is a note to let you know that I have just added a patch titled
sched/preempt, sh: kmap_coherent relies on disabled preemption
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt7.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 6d6c2c6123950752cd328145c2554432de87212a Mon Sep 17 00:00:00 2001
From: David Hildenbrand <dahi at linux.vnet.ibm.com>
Date: Mon, 29 Feb 2016 09:19:24 +0100
Subject: 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 at xs4all.nl>
Signed-off-by: David Hildenbrand <dahi at linux.vnet.ibm.com>
Tested-by: Hans Verkuil <hans.verkuil at cisco.com>
Signed-off-by: Rich Felker <dalias at libc.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
arch/sh/mm/kmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c
index ec29e14..bf25d7c 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();
}
--
2.7.4
More information about the kernel-team
mailing list