Date: Fri, 18 Dec 2009 19:50:21 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r200681 - stable/7/sys/nfsserver Message-ID: <200912181950.nBIJoLoJ006500@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Dec 18 19:50:21 2009 New Revision: 200681 URL: http://svn.freebsd.org/changeset/base/200681 Log: MFC 200084: Properly return an error reply if an NFS remove or link operation fails. Previously the failing operation would allocate an mbuf and construct an error reply, but because the function did not return 0, the NFS server assumed it had failed to generate a reply and would leak the reply mbuf as well as not sending the reply to the NFS client. Modified: stable/7/sys/nfsserver/nfs_serv.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/7/sys/nfsserver/nfs_serv.c Fri Dec 18 19:43:44 2009 (r200680) +++ stable/7/sys/nfsserver/nfs_serv.c Fri Dec 18 19:50:21 2009 (r200681) @@ -2219,10 +2219,9 @@ out: } 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) { @@ -2596,8 +2595,8 @@ ereply: if (v3) { nfsm_srvpostop_attr(getret, &at); nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft); - error = 0; } + error = 0; /* fall through */ nfsmout:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912181950.nBIJoLoJ006500>