linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
@ 2021-12-20 16:39 andrey.konovalov
  2021-12-20 17:08 ` Marco Elver
  0 siblings, 1 reply; 2+ messages in thread
From: andrey.konovalov @ 2021-12-20 16:39 UTC (permalink / raw)
  To: Alexander Potapenko, Andrew Morton
  Cc: Andrey Konovalov, Marco Elver, Dmitry Vyukov, Andrey Ryabinin,
	kasan-dev, linux-mm, linux-kernel, Andrey Konovalov

From: Andrey Konovalov <andreyknvl@google.com>

Make do_kmem_cache_size_bulk() destroy the cache it creates.

Fixes: 03a9349ac0e0 ("lib/test_meminit: add a kmem_cache_alloc_bulk() test")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 lib/test_meminit.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
  2021-12-20 16:39 [PATCH] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test andrey.konovalov
@ 2021-12-20 17:08 ` Marco Elver
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Elver @ 2021-12-20 17:08 UTC (permalink / raw)
  To: andrey.konovalov
  Cc: Alexander Potapenko, Andrew Morton, Andrey Konovalov,
	Dmitry Vyukov, Andrey Ryabinin, kasan-dev, linux-mm,
	linux-kernel, Andrey Konovalov

On Mon, 20 Dec 2021 at 17:39, <andrey.konovalov@linux.dev> wrote:
>
> From: Andrey Konovalov <andreyknvl@google.com>
>
> Make do_kmem_cache_size_bulk() destroy the cache it creates.
>
> 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>


> ---
>  lib/test_meminit.c | 1 +
>  1 file changed, 1 insertion(+)
>
> 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;
>  }
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-20 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 16:39 [PATCH] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test andrey.konovalov
2021-12-20 17:08 ` Marco Elver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).