summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-02-21 01:05:12 +0000
committerkib <kib@FreeBSD.org>2012-02-21 01:05:12 +0000
commit80ae8fe82cdaa69f78dc90fa27bc9e79863de0ea (patch)
treed0d078391c4959fc08545db4ab619daadd9cf1d9 /sys/fs/devfs
parent31a24bc1664a822f3d06595f42063719e6902ff1 (diff)
downloadFreeBSD-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/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 408c981..4a58a42 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -1156,7 +1156,8 @@ static int
devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td)
{
struct cdev *dev;
- int ioflag, error, ref, resid;
+ int ioflag, error, ref;
+ ssize_t resid;
struct cdevsw *dsw;
struct file *fpop;
@@ -1634,7 +1635,8 @@ static int
devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td)
{
struct cdev *dev;
- int error, ioflag, ref, resid;
+ int error, ioflag, ref;
+ ssize_t resid;
struct cdevsw *dsw;
struct file *fpop;
OpenPOWER on IntegriCloud