summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2004-07-13 07:05:38 +0000
committeralfred <alfred@FreeBSD.org>2004-07-13 07:05:38 +0000
commit51b37935456677085e7e877224559238690d6a50 (patch)
tree5f9af64889ee2668a1826f4de88f2b89d916d6db /sys
parentea85f85ed9f6685920874c01560395d2908d762c (diff)
downloadFreeBSD-src-51b37935456677085e7e877224559238690d6a50.zip
FreeBSD-src-51b37935456677085e7e877224559238690d6a50.tar.gz
Do not call sorecieve() in the context of a socket callback as it causes
lock order reversals so->inpcb since we're called with the socket lock held.
Diffstat (limited to 'sys')
-rw-r--r--sys/nfsserver/nfs_srvsock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index d43b97a..fe91568 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -433,16 +433,18 @@ nfsrv_rcv(struct socket *so, void *arg, int waitflag)
/* XXXRW: Unlocked read. */
if ((slp->ns_flag & SLP_VALID) == 0)
return;
-#ifdef notdef
+
/*
- * Define this to test for nfsds handling this under heavy load.
+ * We can't do this in the context of a socket callback
+ * because we're called with locks held.
+ * XXX: SMP
*/
if (waitflag == M_DONTWAIT) {
NFSD_LOCK();
slp->ns_flag |= SLP_NEEDQ;
goto dorecs;
}
-#endif
+
NFSD_LOCK();
auio.uio_td = NULL;
OpenPOWER on IntegriCloud