From: Adam Kupczyk Date: Mon, 8 Jun 2020 10:36:00 +0000 (+0200) Subject: os/bluestore: Added check against using out-of-range extent X-Git-Tag: v15.2.5~25^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9908f85e0944ce81f558e5ab3fdbf667ab4a9240;p=ceph.git os/bluestore: Added check against using out-of-range extent This partially fixes https://tracker.ceph.com/issues/45903 Signed-off-by: Adam Kupczyk (cherry picked from commit 340917d409012d8a8530c9050b79b875e87dc029) Conflicts: src/os/bluestore/BlueFS.cc - commits are being backported to octopus in the wrong order (40e94a106a8adff6304905d59e1634801d2c9890 has already been backported, yet this commit went into master before it) --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index b3dc9360981..7b42f2f0c73 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1915,6 +1915,7 @@ int BlueFS::_read_random( s_lock.unlock(); uint64_t x_off = 0; auto p = h->file->fnode.seek(off, &x_off); + ceph_assert(p != h->file->fnode.extents.end()); uint64_t l = std::min(p->length - x_off, len); dout(20) << __func__ << " read random 0x" << std::hex << x_off << "~" << l << std::dec