Skip to content

Commit

Permalink
[PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed May 4, 2006
1 parent a054887 commit 98232d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 98232d5

Please sign in to comment.