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 7F546C4167B for ; Mon, 24 Jan 2022 23:54:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2365485AbiAXXvD (ORCPT ); Mon, 24 Jan 2022 18:51:03 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:33936 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573366AbiAXVoy (ORCPT ); Mon, 24 Jan 2022 16:44:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9BCFF61530; Mon, 24 Jan 2022 21:44:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CEFCC340E4; Mon, 24 Jan 2022 21:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060690; bh=MHmC5G+aOd3jIodOwStGtnsuWl6x1s8Ye8y6waVER78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GVxkupgk8Jqk2LO/LN798YajnKUlYf0ukfICEqnnhAAoEPhPtAHdqeo/4DOU4HSTc aoUqO8rutJh2ei+uiBZE2l6Ma/Ue44B7u9ymZsAbRICUd24Tipc8J1SIw0Av15ZVKY wGtaQNwY3HsRFrgs2qQ5c1/IG03/ESB9IYmTngGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , Andrew Morton , Linus Torvalds Subject: [PATCH 5.16 1031/1039] lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test Date: Mon, 24 Jan 2022 19:47:00 +0100 Message-Id: <20220124184159.948287040@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrey Konovalov 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 Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- lib/test_meminit.c | 1 + 1 file changed, 1 insertion(+) --- a/lib/test_meminit.c +++ b/lib/test_meminit.c @@ -337,6 +337,7 @@ static int __init do_kmem_cache_size_bul if (num) kmem_cache_free_bulk(c, num, objects); } + kmem_cache_destroy(c); *total_failures += fail; return 1; }