From: Jens Axboe Date: Thu, 4 May 2006 07:13:49 +0000 (+0200) Subject: [PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check X-Git-Tag: v2.6.17-rc4~44^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98232d504db0a1f91ecaa93686ed3bf61963103b;p=platform%2Fkernel%2Flinux-3.10.git [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 --- diff --git a/fs/compat.c b/fs/compat.c index 3f3e8f4..970888a 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++) {