Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2ED9C433F5 for ; Mon, 20 Dec 2021 16:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233207AbhLTQjx (ORCPT ); Mon, 20 Dec 2021 11:39:53 -0500 Received: from out1.migadu.com ([91.121.223.63]:40421 "EHLO out1.migadu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233033AbhLTQjv (ORCPT ); Mon, 20 Dec 2021 11:39:51 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1640018388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DlacqxZJQgYqXIpFXX6uZOVHwn8FgcGRJKw5vj65G5A=; b=Vz6WWZWbN6G6kMF3FUg1gDf6hmK7U/Nx/WK2MFD6v6kPB4HH0NO0fbXMQqbkULUzuX0yaK RtGzO/sv7/h/dIbf9T4kwDkJAKxaGvJrM1xqYVnXoE//YUJ8tolI5XbMx7qpx4SFmM2pv9 JiYjQixVg+nDVgv92ACPBLP8eBPUaqk= From: andrey.konovalov@linux.dev To: Alexander Potapenko , Andrew Morton Cc: Andrey Konovalov , Marco Elver , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test Date: Mon, 20 Dec 2021 17:39:43 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Konovalov 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 --- 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