Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932069AbVKTTM2 (ORCPT ); Sun, 20 Nov 2005 14:12:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932068AbVKTTM2 (ORCPT ); Sun, 20 Nov 2005 14:12:28 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:20445 "EHLO mail.cs.helsinki.fi") by vger.kernel.org with ESMTP id S932065AbVKTTM1 (ORCPT ); Sun, 20 Nov 2005 14:12:27 -0500 Subject: Re: [PATCH 4/12: eCryptfs] Main module functions From: Pekka Enberg To: Anton Altaparmakov Cc: Phillip Hellewell , akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, mike@halcrow.us, mhalcrow@us.ibm.com, mcthomps@us.ibm.com, yoder1@us.ibm.com In-Reply-To: References: <20051119041130.GA15559@sshock.rn.byu.edu> <20051119041740.GD15747@sshock.rn.byu.edu> <84144f020511190247n5cf17800lb4ff019aa406470@mail.gmail.com> Date: Sun, 20 Nov 2005 21:06:56 +0200 Message-Id: <1132513616.8032.3.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.4.1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 28 Hi Anton, On 11/19/05, Phillip Hellewell wrote: > > > + BUG(); > > > + err = -EINVAL; > > > + goto out; On Sat, 19 Nov 2005, Pekka Enberg wrote: > > Why do you want to BUG() and then handle the situation? On Sun, 2005-11-20 at 15:34 +0000, Anton Altaparmakov wrote: > Because you can define BUG() to nothing (on embedded builds for example) > and then you would be screwed if you don't handle the error gracefully. > You should never assume something does not return, except perhaps a > panic() although someone might even get rid of that one day... You have a point but in this case, I don't understand why they don't just handle it gracefully since they clearly can do so. Also, I was under the impression that people who disable BUG() are knowingly taking the risk... Pekka - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/