aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-03-11 17:09:55 +0100
committerGary S. Robertson <gary.robertson@linaro.org>2014-06-06 15:24:09 -0500
commit46730e8060872abb7401ae501bc8f0b480bfb87a (patch)
tree403f8a2ecc795ff367ea658136bd528e9b7c83f5 /arch
parent5f9d8d541182a92126e5594b12a0ffaf38fc0017 (diff)
x86/highmem: add a "already used pte" check
This is a copy from kmap_atomic_prot(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/iomap_32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index 0c953e399b96..62377d67ab07 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -65,6 +65,8 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
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