diff options
author | kib <kib@FreeBSD.org> | 2012-02-21 01:05:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-02-21 01:05:12 +0000 |
commit | 80ae8fe82cdaa69f78dc90fa27bc9e79863de0ea (patch) | |
tree | d0d078391c4959fc08545db4ab619daadd9cf1d9 /sys/kern/vfs_extattr.c | |
parent | 31a24bc1664a822f3d06595f42063719e6902ff1 (diff) | |
download | FreeBSD-src-80ae8fe82cdaa69f78dc90fa27bc9e79863de0ea.zip FreeBSD-src-80ae8fe82cdaa69f78dc90fa27bc9e79863de0ea.tar.gz |
Fix found places where uio_resid is truncated to int.
Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the
sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from
the usermode.
Discussed with: bde, das (previous versions)
MFC after: 1 month
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 7732a94..a6355d9 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -181,7 +181,7 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname, auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } @@ -355,7 +355,7 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname, auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } @@ -672,7 +672,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data, auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > INT_MAX) { + if (nbytes > IOSIZE_MAX) { error = EINVAL; goto done; } |