]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: clamp sizes to INT_MAX in sync i/o code paths 58564/head
authorDhairya Parmar <dparmar@redhat.com>
Wed, 21 Aug 2024 12:24:16 +0000 (17:54 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Wed, 7 May 2025 12:37:50 +0000 (18:07 +0530)
Fixes: https://tracker.ceph.com/issues/67612
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/client/Client.cc

index bde79ea2bf7653176f98d82c2e8169dd86115069..34153bf13b2b768cd6059117ba8ebcd3ddde1cba 100644 (file)
@@ -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,