Skip to content

Commit

Permalink
x86: debug check for kmap_atomic_pfn and iomap_atomic_prot_pfn()
Browse files Browse the repository at this point in the history
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@gmail.com>
LKML-Reference: <20090311143449.GB22244@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Akinobu Mita authored and Ingo Molnar committed Mar 11, 2009
1 parent bb6d59c commit 12074fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/mm/highmem_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 12074fa

Please sign in to comment.