lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] slab: add missing guard for kernel_map_pages() use

All other uses of kernel_map_pages() are explicitly excluded without
CONFIG_DEBUG_PAGEALLOC, this one should be too.

Signed-off-by: Ron Lee <ron@debian.org>


diff --git a/mm/slab.c b/mm/slab.c
index 9a90b00..b5e5b27 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2674,10 +2683,12 @@ static void cache_init_objs(struct kmem_cache *cachep,
slab_error(cachep, "constructor overwrote the"
" start of an object");
}
+#ifdef CONFIG_DEBUG_PAGEALLOC
if ((cachep->buffer_size % PAGE_SIZE) == 0 &&
OFF_SLAB(cachep) && cachep->flags & SLAB_POISON)
kernel_map_pages(virt_to_page(objp),
cachep->buffer_size / PAGE_SIZE, 0);
+#endif
#else
if (cachep->ctor)
cachep->ctor(objp);



\
 
 \ /
  Last update: 2009-05-22 11:35    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean