Date: Tue, 11 Nov 2008 19:41:13 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Doug Rabson <dfr@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r184851 - user/dfr/gssapi/6/sys/nfsserver Message-ID: <alpine.BSF.1.10.0811111940020.63650@fledge.watson.org> In-Reply-To: <200811111551.mABFpjNd005723@svn.freebsd.org> References: <200811111551.mABFpjNd005723@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Nov 2008, Doug Rabson wrote:
> Modified: user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c
> ==============================================================================
> --- user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c Tue Nov 11 14:58:07 2008 (r184850)
> +++ user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c Tue Nov 11 15:51:45 2008 (r184851)
> @@ -227,10 +227,14 @@ nfs_rephead(int siz, struct nfsrv_descri
> if (err == EBADRPC)
> return (NULL);
>
> + /* XXXRW: not 100% clear the lock is needed here. */
> + NFSD_LOCK_ASSERT();
> +
Perhaps this should now be an XXXDFR? :-) Or alternatively, if you think the
locking really is needed, we should convert my old and questionable comment to
a more firm one.
Robert N M Watson
Computer Laboratory
University of Cambridge
> nd->nd_repstat = err;
> if (err && (nd->nd_flag & ND_NFSV3) == 0) /* XXX recheck */
> siz = 0;
>
> + NFSD_UNLOCK();
> MGET(mreq, M_WAIT, MT_DATA);
>
> /*
> @@ -241,6 +245,7 @@ nfs_rephead(int siz, struct nfsrv_descri
> MCLGET(mreq, M_WAIT);
> }
> mb = mreq;
> + NFSD_LOCK();
> bpos = mtod(mb, caddr_t);
>
> if (err != NFSERR_RETVOID) {
> @@ -371,7 +376,9 @@ nfssvc_program(struct svc_req *rqst, SVC
> }
> nfsrvstats.srvrpccnt[nd.nd_procnum]++;
>
> + NFSD_LOCK();
> error = proc(&nd, NULL, curthread, &mrep);
> + NFSD_UNLOCK();
>
> if (nd.nd_cr)
> crfree(nd.nd_cr);
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.1.10.0811111940020.63650>
