Skip to contentSkip to conversation

Patch "sched/preempt, sh: kmap_coherent relies on disabled preemption" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Apr 9, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

sched/preempt, sh: kmap_coherent relies on disabled preemption

to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
sched-preempt-sh-kmap_coherent-relies-on-disabled-preemption.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b15d53d009558d14c4f394a6d1fa2039c7f45c43 Mon Sep 17 00:00:00 2001

From: David Hildenbrand <[email protected]>
Date: Mon, 29 Feb 2016 09:19:24 +0100
Subject: sched/preempt, sh: kmap_coherent relies on disabled preemption

From: David Hildenbrand <[email protected]>

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"
---
 arch/sh/mm/kmap.c |    2 ++
 1 file changed, 2 insertions(+)
arch/sh/mm/kmap.c +2 -0
@@ -36,6 +36,7 @@ void *kmap_coherent(struct page *page, u
 
 	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();
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.5/sched-preempt-sh-kmap_coherent-relies-on-disabled-preemption.patch