Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2647599ybk; Mon, 18 May 2020 04:37:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuSAyuFzdafAUh1887ilPOWi3XxJPx4vCHffNqHGE3aaVvT1hLGvXCW0m2jWl2MaG1nXcj X-Received: by 2002:a17:906:da0c:: with SMTP id fi12mr14038955ejb.254.1589801834286; Mon, 18 May 2020 04:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589801834; cv=none; d=google.com; s=arc-20160816; b=DW7mhbPem9SKf3jSu8buQDasjVcuOjULIsLqqUOKqXol52w0hrWbfKt9qsCnPTM8BW URbpNxa0oIaSo4J2vpSkmYyLgEsDqYZwki/rRH8EgB8bI74UkgJ1PPjdodVECJjGFbrX gRLXLsd4toCEw5OCMBoutMq1zfTybykvUl2HZiEKS2kptMUakeTt3eMLdd7U5vY3MolA /g8W+Rfm3T/z4wnU6iolqOYUxgDpZzaV+PXO5gKQCghLCuyoL9ef1D6zhiiLZPl5T/IQ IsTX43G+OK653mdalz40imKdNiajqRybsVDjyikaSF/EwKz+3kTkjJXIZ7OoAC7XEyPk TFNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5J3ZUkq3lvS+GM3BzTiYwJTksssn9mstIHrEZF38FTs=; b=XmddMcvuzuYxASDlg+fqzb2isN0YGy+KeVI0462p0CLBuJWccz2CDizB2Zhidyfib/ ABk2RaNjfnIs9AtyWrtpBqPDqPo0X+fxR3pbDRDYYcZ8rcWeQwMKaKRINnIkGWgVvYfB nDKYJDn0JPo4SBaPucLnyStGCIniRXb133hrK/ltc2sefJT+6rhAuzuXm4I09Gk+NQzB yQnUX4bIaXn1HaET/vWVCPNBQwR7Sq7w7HcFZZsvOgdBb6RgxdEKB1zzkZSnr5gp+J/M pFVsRJKcpyWyXXO/nnDSoP+vgd7bALS3P/bkBc08T9SUcQXw8OkpVgD3ILJN61oglCKk p7Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si3348266edl.184.2020.05.18.04.36.42; Mon, 18 May 2020 04:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgERLej (ORCPT + 99 others); Mon, 18 May 2020 07:34:39 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51082 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726526AbgERLej (ORCPT ); Mon, 18 May 2020 07:34:39 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D496DEC4CE1912E258A9; Mon, 18 May 2020 19:34:34 +0800 (CST) Received: from [127.0.0.1] (10.166.215.100) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 18 May 2020 19:34:28 +0800 Subject: Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep() To: Markus Elfring , , CC: , , "Feilong Lin" , Jens Axboe , Tejun Heo , Zhiqiang Liu References: <4c670a6c-98c3-2b14-7438-09199506d92f@web.de> From: Wu Bo Message-ID: <5cfba9c1-675d-d4e8-65bf-746712ae32e5@huawei.com> Date: Mon, 18 May 2020 19:34:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <4c670a6c-98c3-2b14-7438-09199506d92f@web.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.166.215.100] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/15 23:08, Markus Elfring wrote: > … >> new_blkg = blkg_alloc(pos, q, GFP_KERNEL); > … > > I suggest to omit the source code quotation from the change description. > > >> if calling blkg_lookup_check() failed, at the IS_ERR block, >> the new_blkg should be free before goto lable fail_unlock >> in blkg_conf_prep() function. > > How do you think about a wording variant like the following? > > If a call of the function “blkg_lookup_check” failed, > release the previously allocated block group before jumping > to the target “fail_unlock” in the implementation of > the function “blkg_conf_prep”. > Thanks for your suggestion. omit the source code quotation from the description is more friendly. I will modify the description in V2 patch. Thanks, Wu Bo > > Would you like to add the tag “Fixes” to the commit message? > > Regards, > Markus >