diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 35d60ce21..81f421bbb 100755 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -421,9 +421,12 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t gfp) /* try the slab allocator first */ if (object_cache) { - object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp)); - if (object) - return object; + while (1) { + object = kmem_cache_alloc(object_cache, + gfp_kmemleak_mask(gfp)); + if (object) + return object; + } } /* slab allocation failed, try the memory pool */