From owner-freebsd-fs@FreeBSD.ORG Mon Nov 30 16:43:49 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46366106566B; Mon, 30 Nov 2009 16:43:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8438FC13; Mon, 30 Nov 2009 16:43:49 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CBBE846B06; Mon, 30 Nov 2009 11:43:48 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 272EB8A024; Mon, 30 Nov 2009 11:43:48 -0500 (EST) From: John Baldwin To: freebsd-fs@freebsd.org Date: Mon, 30 Nov 2009 11:37:08 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200911250340.nAP3e5ud052278@freefall.freebsd.org> In-Reply-To: <200911250340.nAP3e5ud052278@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200911301137.08967.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 30 Nov 2009 11:43:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Rick Macklem Subject: Re: kern/140853: [nfs] [patch] NFSv2 remove calls fail to send error replies (memory leak!) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 16:43:49 -0000 On Tuesday 24 November 2009 10:40:05 pm linimon@freebsd.org wrote: > Old Synopsis: NFSv2 remove calls fail to send error replies (memory leak!) > New Synopsis: [nfs] [patch] NFSv2 remove calls fail to send error replies (memory leak!) > > Responsible-Changed-From-To: freebsd-bugs->freebsd-fs > Responsible-Changed-By: linimon > Responsible-Changed-When: Wed Nov 25 03:39:42 UTC 2009 > Responsible-Changed-Why: > Over to maintainer(s). I think nfsrv_link() has the same leak as well. Rick, does this look ok to you? Index: nfs_serv.c =================================================================== --- nfs_serv.c (revision 199529) +++ nfs_serv.c (working copy) @@ -1810,10 +1810,9 @@ } ereply: nfsm_reply(NFSX_WCCDATA(v3)); - if (v3) { + if (v3) nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); - error = 0; - } + error = 0; nfsmout: NDFREE(&nd, NDF_ONLY_PNBUF); if (nd.ni_dvp) { @@ -2187,8 +2186,8 @@ if (v3) { nfsm_srvpostop_attr(getret, &at); nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); - error = 0; } + error = 0; /* fall through */ nfsmout: -- John Baldwin