From: Dhairya Parmar Date: Wed, 21 Aug 2024 12:24:16 +0000 (+0530) Subject: client: clamp sizes to INT_MAX in sync i/o code paths X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d2699c4bcad979699d1d1b91a7fb53b010ec8dfb;p=ceph.git client: clamp sizes to INT_MAX in sync i/o code paths Fixes: https://tracker.ceph.com/issues/67612 Signed-off-by: Dhairya Parmar --- diff --git a/src/client/Client.cc b/src/client/Client.cc index bde79ea2bf76..34153bf13b2b 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -16091,7 +16091,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 -CEPHFS_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) @@ -16106,7 +16106,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 -CEPHFS_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,