From d2699c4bcad979699d1d1b91a7fb53b010ec8dfb Mon Sep 17 00:00:00 2001 From: Dhairya Parmar Date: Wed, 21 Aug 2024 17:54:16 +0530 Subject: [PATCH] client: clamp sizes to INT_MAX in sync i/o code paths Fixes: https://tracker.ceph.com/issues/67612 Signed-off-by: Dhairya Parmar --- src/client/Client.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index bde79ea2bf765..34153bf13b2b7 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, -- 2.39.5