]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: fix possible recursive lock of ImageReplayer::m_lock 61835/head
authorN Balachandran <nithya.balachandran@ibm.com>
Sat, 15 Feb 2025 13:26:31 +0000 (18:56 +0530)
committerN Balachandran <nithya.balachandran@ibm.com>
Sun, 16 Feb 2025 10:09:57 +0000 (15:39 +0530)
commitc60514087bc29540d3babd7855c5a4e28f2bf1b0
tree3ae93ef94a358723525d8c6400963d49d1557122
parent92ef6ae4a36f5d543520bae4c2165003f190c6fb
rbd-mirror: fix possible recursive lock of ImageReplayer::m_lock

If periodic status update (LambdaContext which is queued from
handle_update_mirror_image_replay_status()) races with shutdown and
ends up being the last in-flight operation that shutdown was pending
on, we attempt to recursively acquire m_lock in shut_down() because
m_in_flight_op_tracker.finish_op() is called with m_lock (and also
m_threads->timer_lock) held.  These locks are needed only for the call
to schedule_update_mirror_image_replay_status() and should be unlocked
immediately.

Fixes: https://tracker.ceph.com/issues/69978
Co-authored-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
src/tools/rbd_mirror/ImageReplayer.cc