From owner-svn-src-head@FreeBSD.ORG Thu Nov 29 00:14:25 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 464FCC23; Thu, 29 Nov 2012 00:14:25 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2AEAF8FC0C; Thu, 29 Nov 2012 00:14:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EALyntlCDaFvO/2dsb2JhbABFhiq6DnOCHgEBBSMEUhsOBgQCAg0ZAlkGiBEDDwysJ4kWDYlUgSKLHYMugRMDiF6NI4EcjyiDEIID X-IronPort-AV: E=Sophos;i="4.84,180,1355115600"; d="scan'208";a="2472250" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu.net.uoguelph.ca with ESMTP; 28 Nov 2012 19:14:23 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 72483B4023; Wed, 28 Nov 2012 19:14:23 -0500 (EST) Date: Wed, 28 Nov 2012 19:14:23 -0500 (EST) From: Rick Macklem To: Mateusz Guzik Message-ID: <460700956.954956.1354148063432.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20121128122034.GB17871@dft-labs.eu> Subject: Re: svn commit: r243645 - head/usr.sbin/nfsd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Alfred Perlstein 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: Thu, 29 Nov 2012 00:14:25 -0000 Mateusz Guzik wrote: > 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; > } > [..] > Well, since only root can do this and I can't think of why a sysadmin would use anything other than nfsd, I'm not sure it matters much? (But I don't see a problem with adding a sanity check in the kernel code.) rick > -- > Mateusz Guzik