2018-08-27 14:32:32 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Mon, 11 Mar 2013 17:09:55 +0100
|
2019-11-25 00:04:39 +00:00
|
|
|
Subject: [PATCH 217/290] x86/highmem: Add a "already used pte" check
|
|
|
|
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c1e9c3cef196f71a33fb68f1a9a0c65ab2d27d2d
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
This is a copy from kmap_atomic_prot().
|
|
|
|
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
arch/x86/mm/iomap_32.c | 2 ++
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
|
|
|
|
index d5a48210d0f6..c0ec8d430c02 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/arch/x86/mm/iomap_32.c
|
|
|
|
+++ b/arch/x86/mm/iomap_32.c
|
2019-04-08 23:49:20 +00:00
|
|
|
@@ -69,6 +69,8 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
|
2018-08-27 14:32:32 +00:00
|
|
|
type = kmap_atomic_idx_push();
|
|
|
|
idx = type + KM_TYPE_NR * smp_processor_id();
|
|
|
|
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
|
|
|
|
+ WARN_ON(!pte_none(*(kmap_pte - idx)));
|
|
|
|
+
|
|
|
|
#ifdef CONFIG_PREEMPT_RT_FULL
|
|
|
|
current->kmap_pte[type] = pte;
|
|
|
|
#endif
|