diff --git a/mm/slab.h b/mm/slab.h index ebdfc19c64db..8e64e3a5f782 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -239,6 +239,7 @@ extern unsigned long get_each_object_track(struct kmem_cache *s, struct page *page, enum track_item alloc, int (*fn)(const struct kmem_cache *, const void *, const struct track *, void *), void *private); +extern slab_flags_t slub_debug; #else static inline void print_tracking(struct kmem_cache *s, void *object) { diff --git a/mm/slub.c b/mm/slub.c index 972637b2bae9..faad06d6c81a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -473,9 +473,9 @@ static inline void *restore_red_left(struct kmem_cache *s, void *p) * Debug settings: */ #if defined(CONFIG_SLUB_DEBUG_ON) -static slab_flags_t slub_debug = DEBUG_DEFAULT_FLAGS; +slab_flags_t slub_debug = DEBUG_DEFAULT_FLAGS; #else -static slab_flags_t slub_debug; +slab_flags_t slub_debug; #endif static char *slub_debug_string;