svn commit: r225080 - stable/8/sys/kern
John Baldwin
jhb at FreeBSD.org
Mon Aug 22 18:41:40 UTC 2011
Author: jhb
Date: Mon Aug 22 18:41:39 2011
New Revision: 225080
URL: http://svn.freebsd.org/changeset/base/225080
Log:
MFC 224986:
One of the general principles of the sysctl(3) API is that a user can
query the needed size for a sysctl result by passing in a NULL old
pointer and a valid oldsize. The kern.proc.args sysctl handler broke
this assumption by not calling SYSCTL_OUT() if the old pointer was NULL.
Modified:
stable/8/sys/kern/kern_proc.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/kern/kern_proc.c
==============================================================================
--- stable/8/sys/kern/kern_proc.c Mon Aug 22 18:36:58 2011 (r225079)
+++ stable/8/sys/kern/kern_proc.c Mon Aug 22 18:41:39 2011 (r225080)
@@ -1383,7 +1383,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARG
pa = p->p_args;
pargs_hold(pa);
PROC_UNLOCK(p);
- if (req->oldptr != NULL && pa != NULL)
+ if (pa != NULL)
error = SYSCTL_OUT(req, pa->ar_args, pa->ar_length);
pargs_drop(pa);
if (error != 0 || req->newptr == NULL)
More information about the svn-src-stable
mailing list