Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp283890imp; Thu, 21 Feb 2019 01:11:09 -0800 (PST) X-Google-Smtp-Source: AHgI3Iam6eEBAKd2fFk2EzPTjpdzbw6iwaWN8Qha79AZKkZ+GfTAFWIeCi1Av3S9aF/Q9wvk5dqa X-Received: by 2002:a17:902:7890:: with SMTP id q16mr19390212pll.63.1550740269720; Thu, 21 Feb 2019 01:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550740269; cv=none; d=google.com; s=arc-20160816; b=ITJ6TIKmywqT+LA5FjpHEkKZ7WtZSei4Y67DhMJc0iFlBi1OHNHCM0Q7leEHkLcYB7 TrCxFELSgjbwobvX15of6uhG7BJ4hC3O5WQxXjmH4Oia4m8NelvXd7Xn+McpFYqSP6YU We8XbOQdaxy+v755txAZtVUSC3lx94AvKzlfa7C/xhbqWvhikhurnk395jdQAoDzDW1A vxYncBeBT1pTjxUuPXF8BQFoqbrcSQOjMIuVWuUVtJc2OcTAvia/G8quVOmiZxvpQG/0 J3vXqZGBwyyH7zDqPI6C4Wkn71cKfF9vuG3y4r0iPEq3wNLr4pSWzh87O4ZwTGt3uutB /2Zg== 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=wrh4/JJhozDWyemVq5UWA9zW0Git+SM1T4dGyGZsVNM=; b=gVx8u4dxFMKLHZSc22CLLN4c6wSazrR3WU8jgaBW1j4Vjw+eApK2xCF+kKzX4VSfhi ax7MTBp9mpeul1OeRrs82yVd3rnu3/fPwBBCj9uyh86FX8WNaWKDwYukegCQepbBqaej S4bJaNVaVSAjtWcI5I52lYt6r7Jt/L5Ron5l6EHFuY4fej5Bypwkwef+Gx27qdcQLh0l yUKuJnTw3TCsXPBjU7Xx7B4xx14JJRd1lKSmKReZCK36/IN3b7i8/mSw1DWq08Xemwzt 8mhUCx+HGjFS4v1+6vXrgabNRDJnGPPj2A1Q/1nWIrKbQMZ1Wd+ku9ykTSga6Tfx1Lq+ apyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KetB6Q6N; 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 u37si2180771pgn.480.2019.02.21.01.10.53; Thu, 21 Feb 2019 01:11:09 -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; dkim=pass header.i=@kernel.org header.s=default header.b=KetB6Q6N; 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 S1727433AbfBUJKO (ORCPT + 99 others); Thu, 21 Feb 2019 04:10:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:59712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfBUJKN (ORCPT ); Thu, 21 Feb 2019 04:10:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B7302086C; Thu, 21 Feb 2019 09:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550740213; bh=s8S79TiwSNQPycQI9tlCN5pynyKc8OhiDbHfbeClHHM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KetB6Q6N+4/P79febiDQ77mYAT4JEczdD/6MzfbbnvpaFL41pSGerqEuD+AoBpEPO nXEKjzwTqqANnIWMhK5oToDJzomCHyQ1NqdyeUKQxG8UPpN3WAyHB6iL44rCVLUqpF 8I8Sno2SUe1yW2MiJdTcB+K24hwUdG/mSGb2XmH8= Date: Thu, 21 Feb 2019 10:10:10 +0100 From: Greg KH To: Yue Hu Cc: Michal Hocko , akpm@linux-foundation.org, rientjes@google.com, joe@perches.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, huyue2@yulong.com Subject: Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one() Message-ID: <20190221091010.GA11118@kroah.com> References: <20190221040130.8940-1-zbestahu@gmail.com> <20190221040130.8940-2-zbestahu@gmail.com> <20190221082309.GG4525@dhcp22.suse.cz> <20190221165642.00005d86.zbestahu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190221165642.00005d86.zbestahu@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 21, 2019 at 04:56:42PM +0800, Yue Hu wrote: > On Thu, 21 Feb 2019 09:23:09 +0100 > Michal Hocko wrote: > > > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > > From: Yue Hu > > > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > > will be meanless since it depends on non-NULL tmp dentry and it will > > > only waste CPU resource. > > > > The file will be created in the debugfs root. But, more importantly. > > Greg (CCed now) is working on removing the failure paths because he > > believes they do not really matter for debugfs and they make code more > > ugly. More importantly a check for NULL is not correct because you > > get ERR_PTR after recent changes IIRC. > > Same check logic in cma_debugfs_init(), i'm just finding they do not stay > the same. I have patches to fix that up as well :) thanks, greg k-h