Skip to content

Commit e073e5e

Browse files
xairytorvalds
authored andcommitted
lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
Make do_kmem_cache_size_bulk() destroy the cache it creates. Link: https://lkml.kernel.org/r/aced20a94bf04159a139f0846e41d38a1537debb.1640018297.git.andreyknvl@google.com Fixes: 03a9349 ("lib/test_meminit: add a kmem_cache_alloc_bulk() test") Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Marco Elver <elver@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c7e4289 commit e073e5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/test_meminit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ static int __init do_kmem_cache_size_bulk(int size, int *total_failures)
337337
if (num)
338338
kmem_cache_free_bulk(c, num, objects);
339339
}
340+
kmem_cache_destroy(c);
340341
*total_failures += fail;
341342
return 1;
342343
}

0 commit comments

Comments
 (0)