47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 1fab47de0f663c28d0d97f09a1ec9ed3fad1052d Mon Sep 17 00:00:00 2001
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Sat, 19 Sep 2015 10:15:00 +0200
|
|
Subject: [PATCH 261/365] mm: rt: Fix generic kmap_atomic for RT
|
|
|
|
The update to 4.1 brought in the mainline variant of the pagefault
|
|
disable distangling from preempt count. That introduced a
|
|
preempt_disable/enable pair in the generic kmap_atomic/kunmap_atomic
|
|
implementations which got not converted to the _nort() variant.
|
|
|
|
That results in massive 'scheduling while atomic/sleeping function
|
|
called from invalid context' splats.
|
|
|
|
Fix that up.
|
|
|
|
Reported-and-tested-by: Juergen Borleis <jbe@pengutronix.de>
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
include/linux/highmem.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
|
|
index 396d5c42272e..2f56829181ee 100644
|
|
--- a/include/linux/highmem.h
|
|
+++ b/include/linux/highmem.h
|
|
@@ -65,7 +65,7 @@ static inline void kunmap(struct page *page)
|
|
|
|
static inline void *kmap_atomic(struct page *page)
|
|
{
|
|
- preempt_disable();
|
|
+ preempt_disable_nort();
|
|
pagefault_disable();
|
|
return page_address(page);
|
|
}
|
|
@@ -74,7 +74,7 @@ static inline void *kmap_atomic(struct page *page)
|
|
static inline void __kunmap_atomic(void *addr)
|
|
{
|
|
pagefault_enable();
|
|
- preempt_enable();
|
|
+ preempt_enable_nort();
|
|
}
|
|
|
|
#define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn))
|
|
--
|
|
2.28.0
|
|
|