Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp73022iof; Sun, 5 Jun 2022 21:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwukeaWqo67ecdB0ex4WyyM8v67ODsKbFr4TzYV9ISRmXeOD9xy9nhiDRdKw0C6BXyG/94D X-Received: by 2002:a17:903:2c7:b0:158:2f26:6016 with SMTP id s7-20020a17090302c700b001582f266016mr22864869plk.154.1654489865076; Sun, 05 Jun 2022 21:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654489865; cv=none; d=google.com; s=arc-20160816; b=vAT0fIIH/1OfDRYX9uSuW5HGLlsS0zx/ICzPO6imLlhJ64ewX1lWDeWrsFvkwRs2aE q1uF9wxl0v9jc6RsqY3XyxAC7m6MhZwhEzSrFPsWlwwrD6crAVQiAfOWsBhil4hnZrom i463voH3l68yYba2V3Tk/A3ci/1GVabSmwY3RgN62At9biTXXn7TuuloI01z4ajPA6MR LPv4IyM06wCYl9PweyHvfKfBmVK8k1tmTK/6Y6uxGsnJVeW9x2uR4l518EpsVDwg9+q0 enm7bNaYjo/5hbxOZ9qpBRDNY57VTJk0/Jp1R4+YXAFNM1ychkivGeZMzMgLuapYTUyv Hpew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r3ic2EpVrEZxLm5NH6DVtfqMbz3Rwp34Rz8EL3kyYUU=; b=WjthGIjwCkA2pNUm+g6BXwLukfaC3UGlCHLCk8e42gSTIaoGMZYBnKVouuqQmYkMuS buleEWckhGWQJDmLedA+9DZwZStIt0M0AZRvmEzIaz/8AyTXVhIAGCb3HO4e6PTPB/lz EicKLtYgbw6UK8h/noR2ytrloBDxE98o5ehXRpYCJsnMj9PLO6heQ4b/CuvlHRs/hjXK sgn6FjsWNH0AeMp4iTWfTBPlSvkIodgzb9Mkm9lt1jV7RZ6Fe/Lwhbp8j+aZizgCJMT9 JNnPuRG0MQh40An+sF6Er1eqAkNb7kjsO2VqkRkBG+PuGp3lyEvVYUhLeHR+Yg2zmOmE ztLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="tO/HbTvf"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v17-20020a056a00149100b0051b51d8211fsi7996273pfu.91.2022.06.05.21.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:31:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="tO/HbTvf"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A7A4EFD38; Sun, 5 Jun 2022 20:57:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243482AbiFCRlN (ORCPT + 99 others); Fri, 3 Jun 2022 13:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344654AbiFCRki (ORCPT ); Fri, 3 Jun 2022 13:40:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD9B05370C; Fri, 3 Jun 2022 10:40:36 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 855BAB8242E; Fri, 3 Jun 2022 17:40:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBAAFC385A9; Fri, 3 Jun 2022 17:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278034; bh=Tf/1ZHZY21OoVrBNdm1QUMrhlV55RYeuYZ5RF1nX20w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tO/HbTvfZ84/uRl29yDF5WLtJP0bmPcT4kx1WiQUZNk74/xWAMxZgR8OKI0HZP3I2 nxjHC7z69S+VMRxS0mTllyP7Ufifc1VWUYeKo6K2FeapHBNKxBIWNUR8IBstR+3PIB ME8nnDUQG5egOkH+6skRbMyYvHOrELBP0vRqoqXM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haimin Zhang , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Dragos-Marian Panait Subject: [PATCH 4.14 12/23] block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern Date: Fri, 3 Jun 2022 19:39:39 +0200 Message-Id: <20220603173814.739868619@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173814.362515009@linuxfoundation.org> References: <20220603173814.362515009@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Greg Kroah-Hartman --- block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/bio.c +++ b/block/bio.c @@ -1657,7 +1657,7 @@ struct bio *bio_copy_kern(struct request if (bytes > len) bytes = len; - page = alloc_page(q->bounce_gfp | gfp_mask); + page = alloc_page(q->bounce_gfp | __GFP_ZERO | gfp_mask); if (!page) goto cleanup;