Commit 922d566c authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Linus Torvalds
Browse files

mm/slub: query dynamic DEBUG_PAGEALLOC setting

We can disable debug_pagealloc processing even if the code is compiled
with CONFIG_DEBUG_PAGEALLOC.  This patch changes the code to query
whether it is enabled or not in runtime.

[ clean up code, per Christian]
Signed-off-by: default avatarJoonsoo Kim <>
Reviewed-by: default avatarChristian Borntraeger <>
Cc: Benjamin Herrenschmidt <>
Cc: Chris Metcalf <>
Cc: Christoph Lameter <>
Cc: David Rientjes <>
Cc: Pekka Enberg <>
Cc: Takashi Iwai <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f48d97f3
......@@ -254,11 +254,10 @@ static inline void *get_freepointer_safe(struct kmem_cache *s, void *object)
void *p;
if (!debug_pagealloc_enabled())
return get_freepointer(s, object);
probe_kernel_read(&p, (void **)(object + s->offset), sizeof(p));
p = get_freepointer(s, object);
return p;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment