lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191107110042.13acd6f5@xps13>
Date:   Thu, 7 Nov 2019 11:09:26 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Artem Bityutskiy <dedekind1@...il.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: no need to check return value of debugfs_create
 functions

Hi Greg,

Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote on Thu, 7 Nov
2019 10:15:18 +0100:

> On Thu, Nov 07, 2019 at 10:09:44AM +0100, Miquel Raynal wrote:
> > Hi Greg,
> > 
> > Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote on Thu, 7 Nov
> > 2019 09:51:11 +0100:
> >   
> > > When calling debugfs functions, there is no need to ever check the
> > > return value.  The function can work or not, but the code logic should
> > > never do something different based on this.  
> > 
> > I didn't know about this. Is this something new or has it been the rule
> > since the beginning? In the  case, don't we need a Fixes tag here?  
> 
> It's been the way always, but as of a few kernel releases ago, debugfs
> is even more "fault-tolerant" of stuff like this.
> 
> And there's no need for a "Fixes:" as this is just work to clean up the
> debugfs api and usage (I have a lot more work to do after these types of
> changes.)

Ok, thanks for the clarification.

Cheers!
Miquèl

> 
> >   
> > > Cc: David Woodhouse <dwmw2@...radead.org>
> > > Cc: Brian Norris <computersforpeace@...il.com>
> > > Cc: Marek Vasut <marek.vasut@...il.com>
> > > Cc: Miquel Raynal <miquel.raynal@...tlin.com>
> > > Cc: Richard Weinberger <richard@....at>
> > > Cc: Vignesh Raghavendra <vigneshr@...com>
> > > Cc: Artem Bityutskiy <dedekind1@...il.com>
> > > Cc: linux-mtd@...ts.infradead.org
> > > Cc: linux-kernel@...r.kernel.org
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>  
> > 
> > [...]
> >   
> > > +
> > > +	d->dfs_emulate_io_failures = debugfs_create_file("tst_emulate_io_failures",
> > > +							 S_IWUSR, d->dfs_dir,
> > > +							 (void *)ubi_num,
> > > +							 &dfs_fops);
> > > +
> > > +	d->dfs_emulate_power_cut = debugfs_create_file("tst_emulate_power_cut",
> > > +						       S_IWUSR, d->dfs_dir,
> > > +						       (void *)ubi_num,
> > > +						       &dfs_fops);  
> > 
> > Nitpick: I think we miss an empty line here. I can fix it when applying.  
> 
> Ah, oops, sorry about that.
> 
> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ