summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-05-04 09:13:49 +0200
committerJens Axboe <axboe@suse.de>2006-05-04 09:13:49 +0200
commit98232d504db0a1f91ecaa93686ed3bf61963103b (patch)
tree0034c6798c6463775da82e30561ef6a7e37c5a08 /fs
parenta0548871ed267ae12eb1c860c5aaebd9e466b34e (diff)
downloadlinux-98232d504db0a1f91ecaa93686ed3bf61963103b.tar.gz
linux-98232d504db0a1f91ecaa93686ed3bf61963103b.tar.bz2
linux-98232d504db0a1f91ecaa93686ed3bf61963103b.zip
[PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check
nr_segs may not be > UIO_MAXIOV, however it may be equal to. This makes the behaviour identical to the real sys_vmsplice(). The other foov syscalls also agree that this is the way to go. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 3f3e8f4d43d6..970888aad843 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1323,7 +1323,7 @@ compat_sys_vmsplice(int fd, const struct compat_iovec __user *iov32,
{
unsigned i;
struct iovec *iov;
- if (nr_segs >= UIO_MAXIOV)
+ if (nr_segs > UIO_MAXIOV)
return -EINVAL;
iov = compat_alloc_user_space(nr_segs * sizeof(struct iovec));
for (i = 0; i < nr_segs; i++) {