svn commit: r184851 - user/dfr/gssapi/6/sys/nfsserver

Robert Watson rwatson at FreeBSD.org
Tue Nov 11 11:41:13 PST 2008


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);
>


More information about the svn-src-user mailing list