diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-10-21 07:31:21 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-10-21 07:31:21 +0000 |
commit | 49c137f7be5791eee8102395257cdf48b40c81f7 (patch) | |
tree | ee67959a46304c59df434799575e3820a2cc841f /sys/kern/subr_uio.c | |
parent | fef9d98869a5c15698b0511d8ff1044b517f1e8f (diff) | |
download | FreeBSD-src-49c137f7be5791eee8102395257cdf48b40c81f7.zip FreeBSD-src-49c137f7be5791eee8102395257cdf48b40c81f7.tar.gz |
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier
sometimes included the SYSCTL type, which it should not, except for
procedural SYSCTL nodes.
- Logical OR where binary OR was expected.
- Properly assert the "access" argument passed to all SYSCTL macros,
using the CTASSERT macro. This applies to both static- and dynamically
created SYSCTLs.
- Properly assert the the data type for both static and dynamic
SYSCTLs. In the case of static SYSCTLs we only assert that the data
pointed to by the SYSCTL data pointer has the correct size, hence
there is no easy way to assert types in the C language outside a
C-function.
- Rewrote some code which doesn't pass a constant "access" specifier
when creating dynamic SYSCTL nodes, which is now a requirement.
- Updated "EXAMPLES" section in SYSCTL manual page.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/kern/subr_uio.c')
-rw-r--r-- | sys/kern/subr_uio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 13c678d..f2e6e32 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_pageout.h> #include <vm/vm_map.h> -SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, +SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, UIO_MAXIOV, "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault); |