]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: fix UB while registering perf counters 40680/head
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Wed, 24 Mar 2021 09:05:07 +0000 (10:05 +0100)
committersinguliere <singuliere@autistici.org>
Fri, 9 Apr 2021 05:35:22 +0000 (07:35 +0200)
commitc181a2e5e7d5c4663112ff6af90cee286779c278
treeef1c1b8aaccf5a94a3299f3131e63b18a74744a8
parent932dd17a34e0e09974992c58846070f283329396
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