summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-03-11 16:09:55 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:53 (GMT)
commit88552ea8ca29ad1f2c4a961f663f8c362df97fa7 (patch)
treefa25227a86d0b102705f5761a3906f37345fb227
parent24a92055470f7d51209baa08bc015564438d0e8a (diff)
downloadlinux-fsl-qoriq-88552ea8ca29ad1f2c4a961f663f8c362df97fa7.tar.xz
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>
-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 0c953e3..62377d6 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