diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2022-01-19 18:09:28 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 12:03:03 +0100 |
| commit | 32fb2bf4cdb550540d35839a0230f74051912af6 (patch) | |
| tree | 82ed32a2e106cc7fad5df77b92d3dea073ea5865 /lib | |
| parent | c5ed18a4ba1ba4579ab5539e9b187d3f0d5067e1 (diff) | |
| download | linux-32fb2bf4cdb550540d35839a0230f74051912af6.tar.gz linux-32fb2bf4cdb550540d35839a0230f74051912af6.tar.bz2 linux-32fb2bf4cdb550540d35839a0230f74051912af6.zip | |
lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
commit e073e5ef90298d2d6e5e7f04b545a0815e92110c upstream.
Make do_kmem_cache_size_bulk() destroy the cache it creates.
Link: https://lkml.kernel.org/r/aced20a94bf04159a139f0846e41d38a1537debb.1640018297.git.andreyknvl@google.com
Fixes: 03a9349ac0e0 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/test_meminit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/test_meminit.c b/lib/test_meminit.c index e4f706a404b3..3ca717f11397 100644 --- a/lib/test_meminit.c +++ b/lib/test_meminit.c @@ -337,6 +337,7 @@ static int __init do_kmem_cache_size_bulk(int size, int *total_failures) if (num) kmem_cache_free_bulk(c, num, objects); } + kmem_cache_destroy(c); *total_failures += fail; return 1; } |
