]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
fsmap: switch to using iterator based loop 48269/head
authorAliaksei Makarau <aliaksei.makarau@ibm.com>
Mon, 20 Jun 2022 08:25:54 +0000 (10:25 +0200)
committerVenky Shankar <vshankar@redhat.com>
Tue, 27 Sep 2022 07:37:14 +0000 (13:07 +0530)
commit9a8467d28c967339177313d098785f3381d89dd6
treee398b999a1a1b33fe43bec53b867f3cccefda109
parente3b54c2cf33fa0b0998e4b2ef08296e062dee14e
fsmap: switch to using iterator based loop

Segfault was triggered by the fs/mirror test.
The problem is in potential undefined behaviour
after erasing element and iterator invalidation in
FSMap::filter().
Fixed by explicit iterator increment.

Fixes: https://tracker.ceph.com/issues/55134
Signed-off-by: Aliaksei Makarau <aliaksei.makarau@ibm.com>
(cherry picked from commit 093331425d1737ea4c3345d46f599be485e55860)

 Conflicts:
src/mds/FSMap.h

Conflict due to use of std::string_view vs string_view.
src/mds/FSMap.h