UMA zone limit can be lowered, so remove protection against from

the sysctl_handle_uma_zone_max().

Sponsored by:	Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2015-04-10 06:56:49 +00:00
parent c047fd1b99
commit 16be9f54e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281353

View File

@ -3540,16 +3540,13 @@ int
sysctl_handle_uma_zone_max(SYSCTL_HANDLER_ARGS)
{
uma_zone_t zone = *(uma_zone_t *)arg1;
int error, max, old;
int error, max;
old = max = uma_zone_get_max(zone);
max = uma_zone_get_max(zone);
error = sysctl_handle_int(oidp, &max, 0, req);
if (error || !req->newptr)
return (error);
if (max < old)
return (EINVAL);
uma_zone_set_max(zone, max);
return (0);