Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp203318imj; Thu, 14 Feb 2019 18:36:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IZA8foGooVexc7yTF35q4yOMsz7hu5iU9LmglU4VYOKt5Y72pvaH04WnDLWstwjtOcMZn+V X-Received: by 2002:a65:6149:: with SMTP id o9mr3081209pgv.315.1550198204898; Thu, 14 Feb 2019 18:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550198204; cv=none; d=google.com; s=arc-20160816; b=oG2DFIcGXX+Ktq+enEXX2456FOgTw4MwuupQRpKSIh8mhtjcLC7TzVgTRSqbq1gtDU 70xIl9y/McwEzL/EcZJdNy0GhEljt//W2nMshb2mrZSy8gPjmo/q0QpTPRIPnjrB+QAh 1SvP9d5CZ6rrHwkaGcEUaZ2RaIRmNTfx+1sktonoxuFKvCcAFy5c/p6AzzqcWkpJKRV6 mYi5aeRJjXG1/af5yfFbnGtz7YoKHd1B+ZZd4XdXHW3yx0OBtJsEMf4J9pByoLqSgbUu PW4NLUMuHYGDUMPUCJO4RAodhFOmgcyChITk3888keECXxoiZOo+SeuEzWf7ra3svWhC PAKw== 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=/NLdV27cOvyqYFIVkp1GO1+nk+uyYNwkwXXyBNZHytk=; b=E7dbOCQ1dW3FwQPELXXfQIXjUTowEm4xnXVm8/TMjP5YTtI1TvfSt5/LETnduxP9JT GgMCM4NAQh41eAFA8s0kB+yBc6aCL9SnrlfrLYsbvFviuXCD3d6JUtCbK7+2TKvrO60e n1gtFyj/LbpUVDUCR4Imomd4/rVFtLIHY6zhfDC/yi9AHmEk5DLZSGOtC0zE1k4M6Pn+ t0W4c3M02LXHUt2a0m1qbCjdzdL4psZ8R4nJt+Xfi8yXEIt2MFPx+hqHgeDyg6+j49qP KoJ/LzOKOqmo3IA4wxqKmCOTNTC8bZNJFdb3vWX+PvaVS1oCWHSRnlDicD03DisVu6cC 4uvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si4085018plk.18.2019.02.14.18.36.29; Thu, 14 Feb 2019 18:36:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730268AbfBOC2J (ORCPT + 99 others); Thu, 14 Feb 2019 21:28:09 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:50252 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391404AbfBOCN2 (ORCPT ); Thu, 14 Feb 2019 21:13:28 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 95AECBE13E56EFF92517; Fri, 15 Feb 2019 10:13:24 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Fri, 15 Feb 2019 10:13:17 +0800 Subject: Re: [PATCH v2] staging: erofs: fix memleak of inode's shared xattr array To: Gao Xiang , Sheng Yong CC: , , , , , Miao Xie , "fangwei (I)" References: <20190214064636.30039-1-shengyong1@huawei.com> From: Chao Yu Message-ID: <4a0a443e-2895-d22f-8dee-bc5e40c31481@huawei.com> Date: Fri, 15 Feb 2019 10:13:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/2/14 15:10, Gao Xiang wrote: > > > On 2019/2/14 14:46, Sheng Yong wrote: >> If it fails to read a shared xattr page, the inode's shared xattr array >> is not freed. The next time the inode's xattr is accessed, the previously >> allocated array is leaked. Nice catch! >> >> Signed-off-by: Sheng Yong > > LGTM, > > Fixes: b17500a0fdba ("staging: erofs: introduce xattr & acl support") > Cc: # 4.19+ > Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Thanks, > > [and there is also another race condition in it, but different root cause. > let me fix it later independently...] > > Thanks, > Gao Xiang > > . >