Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263760AbUDPVRZ (ORCPT ); Fri, 16 Apr 2004 17:17:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263792AbUDPVRZ (ORCPT ); Fri, 16 Apr 2004 17:17:25 -0400 Received: from delerium.kernelslacker.org ([81.187.208.145]:65438 "EHLO delerium.codemonkey.org.uk") by vger.kernel.org with ESMTP id S263760AbUDPVRY (ORCPT ); Fri, 16 Apr 2004 17:17:24 -0400 Date: Fri, 16 Apr 2004 22:16:28 +0100 From: Dave Jones To: trond.myklebust@fys.uio.no Cc: Linux Kernel Subject: NFS thinko Message-ID: <20040416211628.GM20937@redhat.com> Mail-Followup-To: Dave Jones , trond.myklebust@fys.uio.no, Linux Kernel Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 30 Dereferencing 'exp' before the check for NULL. Dave --- linux-2.6.5/include/linux/nfsd/export.h~ 2004-04-16 22:13:28.000000000 +0100 +++ linux-2.6.5/include/linux/nfsd/export.h 2004-04-16 22:14:21.000000000 +0100 @@ -118,13 +118,15 @@ if (ek && !IS_ERR(ek)) { struct svc_export *exp = ek->ek_export; int err; + if (!exp) + goto out; cache_get(&exp->h); expkey_put(&ek->h, &svc_expkey_cache); - if (exp && - (err = cache_check(&svc_export_cache, &exp->h, reqp))) + if (err = cache_check(&svc_export_cache, &exp->h, reqp)) exp = ERR_PTR(err); return exp; } else +out: return ERR_PTR(PTR_ERR(ek)); } - 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/