From patchwork Mon Dec 20 16:39:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12688225 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9135EC433EF for ; Mon, 20 Dec 2021 16:39:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B07DC6B0071; Mon, 20 Dec 2021 11:39:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AB6A96B0073; Mon, 20 Dec 2021 11:39:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A5296B0074; Mon, 20 Dec 2021 11:39:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id 8B3C36B0071 for ; Mon, 20 Dec 2021 11:39:52 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 48C56181AC9C6 for ; Mon, 20 Dec 2021 16:39:52 +0000 (UTC) X-FDA: 78938734224.27.A486370 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf24.hostedemail.com (Postfix) with ESMTP id 7EBE1180044 for ; Mon, 20 Dec 2021 16:39:46 +0000 (UTC) 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 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Queue-Id: 7EBE1180044 X-Stat-Signature: 7em57jr9o64uo9uihixszjnnu4tzpicn Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Vz6WWZWb; spf=pass (imf24.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam10 X-HE-Tag: 1640018386-861666 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Reviewed-by: Marco Elver --- 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; }