From nobody Fri Dec 19 20:17:09 2025 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 EAAFCE743C4 for ; Thu, 28 Sep 2023 21:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232609AbjI1VMG (ORCPT ); Thu, 28 Sep 2023 17:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjI1VMC (ORCPT ); Thu, 28 Sep 2023 17:12:02 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C291B9 for ; Thu, 28 Sep 2023 14:11:51 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id lyIVqxYRoFUAIlyIVqcqAN; Thu, 28 Sep 2023 23:11:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1695935510; bh=CT0rFoQj+YDKwuwWbEo3e5SQCHTQDs01F+cu4QFHXgE=; h=From:To:Cc:Subject:Date; b=GKDTgvqa9RYXrDd7JRIRmjq5ZV7qkctMPq1hXE3q0NsVLQwHqbGamk6UI1d2nPUpt wmUHjQPqpiZSvfFThnPHZQ2OsNfff/EifuIlFkkCm4pxAgDynuyUt10RDW0/PDJ/aT UPvUPd+uHpExnaTjcnrfd/tYK46sKW2p98W/51Fz1R9mWWGcR56KziyEuF2+VLXSIx x2k+9Ab7Qqdyrc34Tu/2AY4DWIj8qCuvaBo7SBAEZBcTRIkJjOanuxFrmrAjQBGHDf 6F4KAUSeyAOuIB+DMWS8I1GmEtE34dvPw1W+jfFqPlRRlsQO+Mh3i1Z3wEOm/fA+hQ aj0DiKIrWPF5A== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 28 Sep 2023 23:11:50 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Matthew Wilcox , Andrew Morton , "Liam R. Howlett" Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-fsdevel@vger.kernel.org Subject: [PATCH] radix tree test suite: Fix a memory initialization issue Date: Thu, 28 Sep 2023 23:11:45 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" If __GFP_ZERO is used, the whole allocated memory should be cleared, not the first part of it only. Fixes: cc86e0c2f306 ("radix tree test suite: add support for slab bulk APIs= ") Signed-off-by: Christophe JAILLET --- tools/testing/radix-tree/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/radix-tree/linux.c b/tools/testing/radix-tree/li= nux.c index d587a558997f..8ab162c48629 100644 --- a/tools/testing/radix-tree/linux.c +++ b/tools/testing/radix-tree/linux.c @@ -172,7 +172,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gf= p_t gfp, size_t size, if (cachep->ctor) cachep->ctor(p[i]); else if (gfp & __GFP_ZERO) - memset(p[i], 0, cachep->size); + memset(p[i], 0, cachep->size * size); } } =20 --=20 2.34.1