aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/highmem_32.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-28 14:47:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-28 16:08:14 -0400
commit9c312058b2e530722c7bd30c1b6f26eea35dc5fe (patch)
treee3de38b87d0f08e88f3bf6e607283dd26b3f8425 /arch/x86/mm/highmem_32.c
parent1f71f50342c6fe4fbdebe63b0fd196972a70e281 (diff)
Avoid false positive warnings in kmap_atomic_prot() with DEBUG_HIGHMEM
I believe http://bugzilla.kernel.org/show_bug.cgi?id=10318 is a false positive. There's no way in which networking will be using highmem pages here, so it won't be taking the KM_USER0 kmap slot, so there's no point in performing these checks. Cc: Pawel Staszewski <pstaszewski@artcom.pl> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Christoph Lameter <clameter@sgi.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> [ Really sad. We lose almost all real-life coverage of the debug tests with this patch. Now it will only report problems for the cases where people actually end up using a HIGHMEM page, not when they just _might_ use one. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/mm/highmem_32.c')
-rw-r--r--arch/x86/mm/highmem_32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index 3d936f232704..9cf33d3ee5bc 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -73,15 +73,15 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
73{ 73{
74 enum fixed_addresses idx; 74 enum fixed_addresses idx;
75 unsigned long vaddr; 75 unsigned long vaddr;
76 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
77
78 debug_kmap_atomic_prot(type);
79 76
77 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
80 pagefault_disable(); 78 pagefault_disable();
81 79
82 if (!PageHighMem(page)) 80 if (!PageHighMem(page))
83 return page_address(page); 81 return page_address(page);
84 82
83 debug_kmap_atomic_prot(type);
84
85 idx = type + KM_TYPE_NR*smp_processor_id(); 85 idx = type + KM_TYPE_NR*smp_processor_id();
86 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 86 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
87 BUG_ON(!pte_none(*(kmap_pte-idx))); 87 BUG_ON(!pte_none(*(kmap_pte-idx)));