]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix FP error when calculating enteries per bi shard 53592/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 5 Jan 2023 18:57:37 +0000 (13:57 -0500)
committerMykola Golub <mgolub@suse.com>
Fri, 22 Sep 2023 06:12:43 +0000 (09:12 +0300)
commit10e46175347334ab2db19bf53595491d16651902
tree40794a83ad249c1f8e18788cd947b38e44c9b9ad
parent6a79a820023a319f355860addc815932569f58e6
rgw: fix FP error when calculating enteries per bi shard

When calculating how many entries per shard to request during an
ordered bucket listing, we divide by the number of bucket index
shards. If this value is 0, then a floating point exception is
generated, crashing the RGW.

This addresses the proximate issue by detecting the situation and
returning an error rather than crashing.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit bd6ee7e78d857bff31b0bb23f0ee8d8737ffef8e)

Conflicts:
src/rgw/rgw_rados.cc (trivial: __func__ vs __PRETTY_FUNCTION__)
src/rgw/rgw_rados.cc