]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: clamp sizes to INT_MAX in sync i/o code paths
authorDhairya Parmar <dparmar@redhat.com>
Wed, 21 Aug 2024 12:24:16 +0000 (17:54 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Thu, 9 Oct 2025 08:45:51 +0000 (14:15 +0530)
Fixes: https://tracker.ceph.com/issues/67612
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit d2699c4bcad979699d1d1b91a7fb53b010ec8dfb)

src/client/Client.cc

index 1092a9004963b255b7f26e0aac4c34aa057e1c7b..4a2582951cd3adbf883ee02748c5538cc9cfff05 100644 (file)
@@ -16138,7 +16138,7 @@ int64_t Client::ll_writev(struct Fh *fh, const struct iovec *iov, int iovcnt, in
     ldout(cct, 3) << "(fh)" << fh << " is invalid" << dendl;
     return -EBADF;
   }
-  return _preadv_pwritev_locked(fh, iov, iovcnt, off, true, false);
+  return _preadv_pwritev_locked(fh, iov, iovcnt, off, true, true);
 }
 
 int64_t Client::ll_readv(struct Fh *fh, const struct iovec *iov, int iovcnt, int64_t off)
@@ -16153,7 +16153,7 @@ int64_t Client::ll_readv(struct Fh *fh, const struct iovec *iov, int iovcnt, int
     ldout(cct, 3) << "(fh)" << fh << " is invalid" << dendl;
     return -EBADF;
   }
-  return _preadv_pwritev_locked(fh, iov, iovcnt, off, false, false);
+  return _preadv_pwritev_locked(fh, iov, iovcnt, off, false, true);
 }
 
 int64_t Client::ll_preadv_pwritev(struct Fh *fh, const struct iovec *iov,