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: <20091202085223.GD21967@wotan.suse.de>
Date:	Wed, 2 Dec 2009 09:52:23 +0100
From:	Nick Piggin <npiggin@...e.de>
To:	tytso@....edu, Marcin Slusarz <marcin.slusarz@...il.com>,
	Amerigo Wang <amwang@...hat.com>, linux-kernel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Jens Axboe <jens.axboe@...cle.com>,
	linux-fsdevel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [Patch] fs: remove a useless BUG()

On Tue, Dec 01, 2009 at 01:52:25PM -0500, tytso@....edu wrote:
> On Tue, Dec 01, 2009 at 05:55:11PM +0100, Marcin Slusarz wrote:
> > On Mon, Nov 30, 2009 at 09:34:14PM -0500, Amerigo Wang wrote:
> > > This BUG() is suspicious, it makes its following statements
> > > unreachable, 
> > only when CONFIG_BUG=y
> 
> Which is true for all kernels except for the very rare embedded case.
> 
> > > and it seems to be useless, since the caller
> > > of this function already handles the failure properly.
> > because this function can return NULL in other codepath
> > 
> > > Remove it.
> > I don't know why this BUG() is there (and maybe it's not really
> > needed), but your rationale is wrong.
> 
> Your reply is a bit snarky, IMHO.  It might have been nicer and more
> courteous if you had bothered to take a closer look at the patch
> before firing off a reply.
> 
> In fact, it's good to avoid BUG() if at all possible, especially if it
> can happen in the normally course of events --- such as running out of
> memory.  Having code which triggers an BUG in an low memory situation
> is very bad form.
> 
> Looks good to me.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@....edu>

Maybe convert it to  a warning?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ