From owner-freebsd-net Thu Feb 28 3:11:14 2002 Delivered-To: freebsd-net@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 077BD37B402 for ; Thu, 28 Feb 2002 03:11:08 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 28 Feb 2002 11:11:06 +0000 (GMT) To: Alfred Perlstein Cc: net@freebsd.org Subject: Re: ipfw+nfs kills both client and server In-Reply-To: Your message of "Thu, 28 Feb 2002 02:28:30 PST." <20020228102830.GA73010@elvis.mu.org> Date: Thu, 28 Feb 2002 11:11:06 +0000 From: Ian Dowse Message-ID: <200202281111.aa87624@salmon.maths.tcd.ie> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <20020228102830.GA73010@elvis.mu.org>, Alfred Perlstein writes: >Now since the default ruleset is to deny everything, the client >locks up spewing 'nfsd send error 13'. > >Now give it two or three shots and you may get the server >to lock up as well! (seems to run out of mbufs) I must have forgotten to commit the fix for this - Garrett noticed the problem a few years ago, and I came across it while testing exactly this scenario more recently (for more details, search for the message ID <200110151653.aa00863@salmon.maths.tcd.ie> on this list). The uio != NULL check that this removes was added in CSRG revision 7.31 (Nov 1991) to support Rick Macklem's NFS work, but I'm fairly sure that it is not needed now. If it was there for performance reasons it should have increased the socket limit, and not removed it alltogether. The patch is below; I'll commit this shortly. Ian Index: uipc_socket.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/kern/uipc_socket.c,v retrieving revision 1.109 diff -u -r1.109 uipc_socket.c --- uipc_socket.c 5 Feb 2002 02:00:53 -0000 1.109 +++ uipc_socket.c 9 Feb 2002 12:52:45 -0000 @@ -549,7 +549,7 @@ if ((atomic && resid > so->so_snd.sb_hiwat) || clen > so->so_snd.sb_hiwat) snderr(EMSGSIZE); - if (space < resid + clen && uio && + if (space < resid + clen && (atomic || space < so->so_snd.sb_lowat || space < clen)) { if (so->so_state & SS_NBIO) snderr(EWOULDBLOCK); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message