Commit 98232d504db0a1f91ecaa93686ed3bf61963103b

Authored by Jens Axboe
1 parent a0548871ed

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1323,7 +1323,7 @@
1323 1323 {
1324 1324 unsigned i;
1325 1325 struct iovec *iov;
1326   - if (nr_segs >= UIO_MAXIOV)
  1326 + if (nr_segs > UIO_MAXIOV)
1327 1327 return -EINVAL;
1328 1328 iov = compat_alloc_user_space(nr_segs * sizeof(struct iovec));
1329 1329 for (i = 0; i < nr_segs; i++) {