[tip:x86/mm] x86: debug check for kmap_atomic_pfn and iomap_atomic_prot_pfn()

From: Akinobu Mita
Date: Wed Mar 11 2009 - 12:55:46 EST


Commit-ID: 12074fa1073013dd11f1cff41db018d5cff4ecd9
Gitweb: http://git.kernel.org/tip/12074fa1073013dd11f1cff41db018d5cff4ecd9
Author: "Akinobu Mita" <akinobu.mita@xxxxxxxxx>
AuthorDate: Wed, 11 Mar 2009 23:34:50 +0900
Commit: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Wed, 11 Mar 2009 15:47:46 +0100

x86: debug check for kmap_atomic_pfn and iomap_atomic_prot_pfn()

It may be useful for kmap_atomic_pfn() and iomap_atomic_prot_pfn()
to check invalid kmap usage as well as kmap_atomic.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
LKML-Reference: <20090311143449.GB22244@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
arch/x86/mm/highmem_32.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index ae4c8da..f256e73 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -128,6 +128,8 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)

pagefault_disable();

+ debug_kmap_atomic_prot(type);
+
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/