diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2004-07-13 07:05:38 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2004-07-13 07:05:38 +0000 |
commit | d83ed0fac0cc10daabc3198fde20003ff486daf9 (patch) | |
tree | 5f9af64889ee2668a1826f4de88f2b89d916d6db | |
parent | 440382a95305b2d64b2f50875c6ba9568a511a23 (diff) | |
download | src-d83ed0fac0cc10daabc3198fde20003ff486daf9.tar.gz src-d83ed0fac0cc10daabc3198fde20003ff486daf9.zip |
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.
Notes
Notes:
svn path=/head/; revision=132086
-rw-r--r-- | sys/nfsserver/nfs_srvsock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index d43b97a21e6d..fe915682598d 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; |