[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190221091010.GA11118@kroah.com>
Date: Thu, 21 Feb 2019 10:10:10 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Yue Hu <zbestahu@...il.com>
Cc: Michal Hocko <mhocko@...nel.org>, akpm@...ux-foundation.org,
rientjes@...gle.com, joe@...ches.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, huyue2@...ong.com
Subject: Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()
On Thu, Feb 21, 2019 at 04:56:42PM +0800, Yue Hu wrote:
> On Thu, 21 Feb 2019 09:23:09 +0100
> Michal Hocko <mhocko@...nel.org> wrote:
>
> > On Thu 21-02-19 12:01:30, Yue Hu wrote:
> > > From: Yue Hu <huyue2@...ong.com>
> > >
> > > 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
Powered by blists - more mailing lists