Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2012 13:20:34 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Alfred Perlstein <alfred@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r243645 - head/usr.sbin/nfsd
Message-ID:  <20121128122034.GB17871@dft-labs.eu>
In-Reply-To: <201211280247.qAS2lWS4018006@svn.freebsd.org>
References:  <201211280247.qAS2lWS4018006@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121128122034.GB17871>