Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004AbZFAOqQ (ORCPT ); Mon, 1 Jun 2009 10:46:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752472AbZFAOqE (ORCPT ); Mon, 1 Jun 2009 10:46:04 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:41303 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbZFAOqD (ORCPT ); Mon, 1 Jun 2009 10:46:03 -0400 In-Reply-To: <4A23A72E.3020506@gmail.com> References: <1243849610.2234.3.camel@system> <4A23A690.6070504@gmail.com> <4A23A72E.3020506@gmail.com> To: Jiri Slaby Cc: Eric Paris , Kylene J Hall , linux-kernel , Reiner Sailer , serue@linux.vnet.ibm.com, vibi_sreenivasan@cms.com, safford@watson.ibm.com MIME-Version: 1.0 Subject: Re: [Fwd: Re: [PATCH]:RESEND : Return proper error value on failure of dentry_open] X-KeepSent: 4496A6A3:97A7AC73-852575C8:004E887B; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5 December 05, 2008 Message-ID: From: Mimi Zohar Date: Mon, 1 Jun 2009 10:45:43 -0400 X-MIMETrack: Serialize by Router on D01ML604/01/M/IBM(Release 8.5|December 05, 2008) at 06/01/2009 10:45:53, Serialize complete at 06/01/2009 10:45:53 Content-Type: text/plain; charset="US-ASCII" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 35 Jiri Slaby wrote on 06/01/2009 06:02:22 AM: > Re: [Fwd: Re: [PATCH]:RESEND : Return proper error value on failure of dentry_open] > > On 06/01/2009 11:59 AM, Jiri Slaby wrote: > > On 06/01/2009 11:46 AM, vibi sreenivasan wrote: > >>>>> mutex_unlock(&iint->mutex); > >>>>> - if (file) > >>>>> + if (!IS_ERR(file)) > >>>>> fput(file); > >>>> > >>>> No, IS_ERR won't catch NULL and there is 'file = NULL' on the > >>>> dentry_open fail path. > >> Can you please point out that line number in fs/open.c > > > > Aha, you use linus's git. This has been fixed by > > f06dd16a03f6f7f72fab4db03be36e28c28c6fd6 > > (IMA: Handle dentry_open failures) > > in -next. > > [But the fix in -next still misses 'return 0' -> 'return rc' which I > though you had tried to change.] At this point, we're just collecting measurements, not appraising them. The return code will be the result of appraise_measurement(). For now, the dentry_open shouldn't fail, but if it does, we probably should audit it. Mimi Zohar -- 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/