From owner-svn-src-head@FreeBSD.ORG Wed Nov 28 12:20:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0B41C3D; Wed, 28 Nov 2012 12:20:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 754578FC17; Wed, 28 Nov 2012 12:20:42 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id 12so1478505wgh.31 for ; Wed, 28 Nov 2012 04:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=7wjA9uRD7f8lTujGTk7IcJGja1nc048qSzQBamaPcyM=; b=a2IkE7qgCgaIzXJaf3oYd9YnZTTJtu1Sb7dZHdTY28cKwB+1Ikmx8L1qx3nTAaJw1z 2aOjbqxdI38kD/xxBPoN/0+yWY6To0zhC6VcMDTszDzBHKqXldPsJ46voi4YCdUdVvBk 6PZoTTPmXK42UXEbpHbYt/BVd5SdH6vt375ZxUaOQKM18QuF/q9YphUZlETGeU5PJto1 1yr6WNe2WOKK+ZBHn0er93iHYnDEMhCinvcM7dhN4GdNskjxeYLw8Tlyhc4YUbaNXx/5 8rM9QhNDBZME6wL93jfdBvowwrda4bU9LVlVMgadrjiNHAGodAWOI00WIP2DulPtnjFE 5uig== Received: by 10.216.91.17 with SMTP id g17mr2591333wef.76.1354105241403; Wed, 28 Nov 2012 04:20:41 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id hv4sm6794748wib.0.2012.11.28.04.20.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Nov 2012 04:20:40 -0800 (PST) Date: Wed, 28 Nov 2012 13:20:34 +0100 From: Mateusz Guzik To: Alfred Perlstein Subject: Re: svn commit: r243645 - head/usr.sbin/nfsd Message-ID: <20121128122034.GB17871@dft-labs.eu> References: <201211280247.qAS2lWS4018006@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201211280247.qAS2lWS4018006@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2012 12:20:43 -0000 On Wed, Nov 28, 2012 at 02:47:32AM +0000, Alfred Perlstein wrote: > Author: alfred > Date: Wed Nov 28 02:47:31 2012 > New Revision: 243645 > URL: http://svnweb.freebsd.org/changeset/base/243645 > > Log: > Don't allow minthreads > maxthreads. > > Suggested by: rmacklem > > Modified: > head/usr.sbin/nfsd/nfsd.c > > Modified: head/usr.sbin/nfsd/nfsd.c > ============================================================================== > --- head/usr.sbin/nfsd/nfsd.c Wed Nov 28 02:23:59 2012 (r243644) > +++ head/usr.sbin/nfsd/nfsd.c Wed Nov 28 02:47:31 2012 (r243645) > @@ -224,6 +224,10 @@ main(int argc, char **argv) > udpflag = 1; > argv += optind; > argc -= optind; > + if (minthreads_set && maxthreads_set && minthreads > maxthreads) > + errx(EX_USAGE, > + "error: minthreads(%d) can't be greater than " > + "maxthreads(%d)", minthreads, maxthreads); > > /* > * XXX Should not this be also checked in the kernel? Looks like nfssvc_nfsd is trustful: [..] if (args) { nfsrv_pool->sp_minthreads = args->minthreads; nfsrv_pool->sp_maxthreads = args->maxthreads; } else { nfsrv_pool->sp_minthreads = 4; nfsrv_pool->sp_maxthreads = 4; } [..] -- Mateusz Guzik