Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp67711iof; Sun, 5 Jun 2022 21:20:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Y795o0pn4bKNhb4RSYwP2NwCTchTYappyuDhEXYCFJ8rIlJU7gW2H2DEApfPGCtfcND1 X-Received: by 2002:a17:902:cf0c:b0:15b:63a4:9f47 with SMTP id i12-20020a170902cf0c00b0015b63a49f47mr22328565plg.1.1654489225924; Sun, 05 Jun 2022 21:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654489225; cv=none; d=google.com; s=arc-20160816; b=ieed/aW8E7oeBCcSxQ/SIl/7g2oO60W/XsfZl/+kIBiFAza0H68NKD07vh0GkAc60Q ojkq/rXmpAdgGGLHM+vLNJWjXxaXsg7JkzBIcowgXVg5s0h/0QIbYRmvUnqkR9FDPcB8 fwxP1YVDy5dPUuqHjwCJipfgdvit4q3+i08BVAPcY/p4LxpwckOlkjlOEK2qmjJtZEBk w+uZV8N9jC+jADMUKTozUvZhlthmDbxc+kwLuR68Oh7OLoEL8RtOojSf8LTAGDDEqN+X rw+d0O03HCst4OQuQ59lfMIuxlg2tQJ2Auly+CGdKLYy2vtXneg/3iJWrrqnULQzdgyX XUYA== 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=BhaBvrxbk3i3yAVECj7bXzA9uT80THVPql2oNJFpc5g=; b=fBxMFnauDG+1vAwtCoN6zwrovLrkzZOZNFg07qxE2knTSBCZfsZwjC7OWjFoqbt65y SsZK4/zNiYzPaOmrdzsedWhCpOnOk2ASnZ2o0TmLVdufyI5YigyNi1EBKKJ4mySNG8VV De6FYf7imgkT+W13n0y0JBlgDKt6gOklBcgSSpzSBj0ASlc8zSjqaIERlYqxaU7IsFCh TclYxtZJW/u40Hz34ooifw22c74dY+vpkFHibX8BVxYCSLwrt3Hy7gznqymV1fvLyVzC Mhdrh3lGiPo9D1optZdw3PKj0gcbPYU94UXgL8RbrQuAmm0qjQJHXMFb7nJkxKE+BO4r blzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bU8WqOAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p4-20020a17090ab90400b001bfb0db0879si19074859pjr.88.2022.06.05.21.20.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bU8WqOAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 CED3A8199F; Sun, 5 Jun 2022 20:53:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345085AbiFCRoB (ORCPT + 99 others); Fri, 3 Jun 2022 13:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345020AbiFCRnj (ORCPT ); Fri, 3 Jun 2022 13:43:39 -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 9DF7854BED; Fri, 3 Jun 2022 10:42:05 -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 49EF0B8241E; Fri, 3 Jun 2022 17:42:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4C0FC385A9; Fri, 3 Jun 2022 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278122; bh=0alvOT1vkFZ0mVurB7FvRHC52wHIVzspOCufxHyjTq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bU8WqOAVmj0ODDfgr+X3uHyPLk3NyMYFHKPzTG0Nb8PTZ+Nz3RGDmINyAdAITEV9H 0wl4aa3He7J6JPM3KsdkA+pce+w7qllytOXoROSgYVKxd0+5e9X83vGnHdghqm44D8 RGT5HP4w4aU6+QReTKkofprys9Ww+I3LSCVtnhMc= 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.19 17/30] block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern Date: Fri, 3 Jun 2022 19:39:45 +0200 Message-Id: <20220603173815.603005664@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173815.088143764@linuxfoundation.org> References: <20220603173815.088143764@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 @@ -1528,7 +1528,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;