]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: fix UB while registering perf counters 40790/head
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Wed, 24 Mar 2021 09:05:07 +0000 (10:05 +0100)
committerNathan Cutler <ncutler@suse.com>
Sun, 11 Apr 2021 10:09:57 +0000 (12:09 +0200)
commitf5fc09f1524e726cf1db84bcb7feac93974bd30e
tree40c353728e12d479f3f3caf1cd57b2dd2a04e9d7
parent1976598f645ad1935a5e428219713b8856796d83
rbd-mirror: fix UB while registering perf counters

register_perf_counters was called before m_image_spec initialization
resulting in UB in the perf counters' name.

This moves the register_perf_counters() call to the init function
after the m_image_spec initialization.

Fixes: https://tracker.ceph.com/issues/49959
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 5e3b9d29b3a81923fed51248aa21749dbecfcd73)
src/tools/rbd_mirror/image_replayer/journal/Replayer.cc