From nobody Tue Apr 28 09:09:45 2026 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 F2BB0C433EF for ; Thu, 2 Jun 2022 15:00:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236307AbiFBPAO (ORCPT ); Thu, 2 Jun 2022 11:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233126AbiFBPAL (ORCPT ); Thu, 2 Jun 2022 11:00:11 -0400 X-Greylist: delayed 629 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 02 Jun 2022 08:00:04 PDT Received: from mail1.wrs.com (unknown-3-146.windriver.com [147.11.3.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 973BF635C for ; Thu, 2 Jun 2022 08:00:04 -0700 (PDT) Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.corp.ad.wrs.com [147.11.82.252]) by mail1.wrs.com (8.15.2/8.15.2) with ESMTPS id 252EnJEX009792 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Jun 2022 07:49:25 -0700 Received: from otp-dpanait-l2.corp.ad.wrs.com (128.224.125.150) by ala-exchng01.corp.ad.wrs.com (147.11.82.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 2 Jun 2022 07:49:19 -0700 From: Dragos-Marian Panait To: CC: Haimin Zhang , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , , , Greg Kroah-Hartman Subject: [PATCH 4.19 1/1] block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern Date: Thu, 2 Jun 2022 17:49:08 +0300 Message-ID: <20220602144908.2250166-2-dragos.panait@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220602144908.2250166-1-dragos.panait@windriver.com> References: <20220602144908.2250166-1-dragos.panait@windriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [128.224.125.150] X-ClientProxiedBy: ala-exchng01.corp.ad.wrs.com (147.11.82.252) To ala-exchng01.corp.ad.wrs.com (147.11.82.252) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Haimin Zhang commit cc8f7fe1f5eab010191aa4570f27641876fa1267 upstream. Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize the buffer of a bio. Signed-off-by: Haimin Zhang Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20220216084038.15635-1-tcs.kernel@gmail.com Signed-off-by: Jens Axboe [DP: Backported to 4.19: Manually added __GFP_ZERO flag] Signed-off-by: Dragos-Marian Panait --- block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bio.c b/block/bio.c index fe749404ef93..7858b2d23916 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1528,7 +1528,7 @@ struct bio *bio_copy_kern(struct request_queue *q, vo= id *data, unsigned int len, if (bytes > len) bytes =3D len; =20 - page =3D alloc_page(q->bounce_gfp | gfp_mask); + page =3D alloc_page(q->bounce_gfp | __GFP_ZERO | gfp_mask); if (!page) goto cleanup; =20 --=20 2.36.1