Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1541480ybl; Sun, 18 Aug 2019 05:40:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzp+f/w97hV+Vjwge8SWnzRs9o9lnqo2mkhLNz4UzFd4xbA+ZBK2IRUNAdYwyvZFL5fJppg X-Received: by 2002:a17:902:8f90:: with SMTP id z16mr17881755plo.138.1566132030058; Sun, 18 Aug 2019 05:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566132030; cv=none; d=google.com; s=arc-20160816; b=1GvtdX+39bHfNExETcN/Lt9JMpx4k/gMJ+yf1mqfApVVcFy7Enxwu8bv9g7SvjWVyN I+L2pQ47y+fFA06SDuX7cVOTlLm+N3YWJPPGyEre0hQoPjNlf8C+HcjiWt+0gANN5kxC HNiFiGafvYAk5wSIhUwitJ64kliGVErZmEzNU41/rNodF46L/y805TOykTrH+SCE6HmM GKEUj553IIz2T022tOv5MB2pxYkgE/ljjSrr4N9Om2IkRSZIKHNp04SmAgTIerQUqBAH SuOFb3IPEwXraCu0N7amL9M2qFGQqIp0uN3rz0tH5utM3/dtgeorfWm2qz7CJ5yF5eR8 3MWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/mcEyNhNZdsxaziyro/9XUfTujsutguSM01LgK/G9go=; b=A/zfqZfCcgljaoI4XWsSwrI8GWLx8mP77DZnGA4/G2isxqCJryWAh0RbCf2kzsb5xl 2JooyPYRmrKEwnE8ziD8BY4Hmjrvc4+dWEJdfTl6QXlrCjyVmKSsTcX1ON7BuF2jmvjj d01hn12sKLCd7MTy36JVQfEDtMbt7aKiIwR6qr2HkymtrcbyZEqjZDxLSBrVfxeRfcxH I2I7kYwGqrN29rCzyJArLpUA+OItzDEnL1J8wc0dFXYuX+PAfUWT/VFkBn6f1xxkqzhu i+kxn5t18O1PIxl7hO6yztubumSbyyDSuDXARgO2XxVus0CqQThb4aD74tEsctUO/x1V vt1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=Xot5PEC7; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s10si6757759pjp.27.2019.08.18.05.40.15; Sun, 18 Aug 2019 05:40:30 -0700 (PDT) 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; dkim=pass header.i=@aol.com header.s=a2048 header.b=Xot5PEC7; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfHRMjQ (ORCPT + 99 others); Sun, 18 Aug 2019 08:39:16 -0400 Received: from sonic303-20.consmr.mail.ir2.yahoo.com ([77.238.178.201]:33973 "EHLO sonic303-20.consmr.mail.ir2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbfHRMjP (ORCPT ); Sun, 18 Aug 2019 08:39:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1566131952; bh=/mcEyNhNZdsxaziyro/9XUfTujsutguSM01LgK/G9go=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=Xot5PEC74D+HgmV+TCCZeYFy6AnigD1cyEBX8QWCJk3pUpX8zPoUMDeGs0PpBwBHlnZ+bN8qXhRhvg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Gmng7sX7YEd8tv8ojI7szhv Q8KJIc5PFE07FIxRo0wbbZu4UOA_vo4SJL5PzCEqumEU4EDjI9osindldRhONALQPXaB_ShhFcOv VTH3Yac.8iMTBPSpw6eJSg5mi0mA.iKxljB.wDfliocg9wdmWI9mPq7QHTrspZ_rtBeYruryIBH3 6jRsZ2ff9IuDL8twvrAvAr8De4qskXNj4VdZXSbCRI13kh6q3Peq2S_MISVj3i8ey8ZX4Mm7HtIl 39EtaW9XtsItCjSqT5H5Kb4a85IwSerEd0ugfhkM0oDtYFgVos88j51BM7l7XUT4Vw8KPGcv4xQz r_cQ5.R826I5LBJQQtyGIiN3n4Y_kLXtOhBeCccsFmdm9ypJGFCy0uf.iRGJWapTdM10ilrDdcI_ ZMrNUUaOm3PY8dQo8u.1NtMRcuSyuOf76UIcbvRLZ7pdZS1DDUnW9NkzxTLL1D.XPLJbS.4ohDgo Ix8iaFtqDqUpuHCNeSGUmjRRmT7IMoq_A0jU_5Ys5pA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Sun, 18 Aug 2019 12:39:12 +0000 Received: by smtp403.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5ac8cd491445deee6abef8e6b8855acd; Sun, 18 Aug 2019 12:39:09 +0000 (UTC) Date: Sun, 18 Aug 2019 20:38:59 +0800 From: Gao Xiang To: Matthew Wilcox Cc: Chao Yu , Richard Weinberger , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org, LKML , linux-erofs@lists.ozlabs.org, Chao Yu , Miao Xie , Fang Wei , Gao Xiang , stable@vger.kernel.org Subject: Re: [PATCH v3 RESEND] staging: erofs: fix an error handling in erofs_readdir() Message-ID: <20190818123858.GA24535@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20190818030109.GA8225@hsiangkao-HP-ZHAN-66-Pro-G1> <20190818032111.9862-1-hsiangkao@aol.com> <20190818123314.GA29733@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190818123314.GA29733@bombadil.infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 18, 2019 at 05:33:14AM -0700, Matthew Wilcox wrote: > On Sun, Aug 18, 2019 at 11:21:11AM +0800, Gao Xiang wrote: > > + if (dentry_page == ERR_PTR(-ENOMEM)) { > > + errln("no memory to readdir of logical block %u of nid %llu", > > + i, EROFS_V(dir)->nid); > > I don't think you need the error message. If we get a memory allocation > failure, there's already going to be a lot of spew in the logs from the > mm system. And if we do fail to allocate memory, we don't need to know > the logical block number or the nid -- it has nothiing to do with those; > the system simply ran out of memory. OK, I agree with you. There is a messy of messages when memory allocation fail. Since I don't really care apart from crashing or hanging the kernel, I will resend the patch to make you and Chao happy... :) Thanks, Gao Xiang > > > + err = -ENOMEM; > > + break; > > + } else if (IS_ERR(dentry_page)) { > > + errln("fail to readdir of logical block %u of nid %llu", > > + i, EROFS_V(dir)->nid); > > + err = -EFSCORRUPTED; > > + break; > > + } > > > > de = (struct erofs_dirent *)kmap(dentry_page); > > > > -- > > 2.17.1 > >