I was able to crash the OSD by sending it a CEPH_OSD_OP_ZERO request
that had an op.extent.length that was 0. Convert that to a no-op
instead.
Fixes: https://tracker.ceph.com/issues/51644
Signed-off-by: Jeff Layton <jlayton@redhat.com>
if (result < 0)
break;
- ceph_assert(op.extent.length);
- if (obs.exists && !oi.is_whiteout()) {
+ if (op.extent.length && obs.exists && !oi.is_whiteout()) {
t->zero(soid, op.extent.offset, op.extent.length);
interval_set<uint64_t> ch;
ch.insert(op.extent.offset, op.extent.length);