From: Thomas Gleixner Date: Thu, 25 Oct 2012 10:32:35 +0100 Subject: [PATCH 081/342] mm: Enable SLUB for RT Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=66a902f49030b2d9bfb39fe4f55b1896c93f213d Avoid the memory allocation in IRQ section Signed-off-by: Thomas Gleixner [bigeasy: factor out everything except the kcalloc() workaorund ] Signed-off-by: Sebastian Andrzej Siewior --- mm/slub.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index e9abe4aa5801..ae6ab2cb4fbf 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3734,6 +3734,11 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page, const char *text) { #ifdef CONFIG_SLUB_DEBUG +#ifdef CONFIG_PREEMPT_RT_BASE + /* XXX move out of irq-off section */ + slab_err(s, page, text, s->name); +#else + void *addr = page_address(page); void *p; unsigned long *map = kcalloc(BITS_TO_LONGS(page->objects), @@ -3755,6 +3760,7 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page, slab_unlock(page); kfree(map); #endif +#endif } /*