diff mbox

[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

Message ID 1459382083-8133-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa March 30, 2016, 11:54 p.m. UTC
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@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@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: Kamal Mostafa <kamal@canonical.com>
---
 arch/sh/mm/kmap.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.7.4
diff mbox

Patch

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();
 }