]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: place the journaler pointer under the mds_lock 42060/head
authorXiubo Li <xiubli@redhat.com>
Fri, 14 May 2021 02:38:49 +0000 (10:38 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 28 Jun 2021 19:32:02 +0000 (12:32 -0700)
commite0caab034b8ae56cba2f591f7bc3981705949ebb
tree10aaed0c005aa17364a44479857a11292ffccb38
parent2e1902f3a43860da461e68ebea5ef8dd48418278
mds: place the journaler pointer under the mds_lock

When the _recovery_thread is trying to reformat the journal, it
will delete the old journal pointer and assign with a new one,
during this the mds_lock is unlocked. That means in other threads,
such as when 'flush journal', who are using the MDSLog::journaler
pointer will potentially hit use-after-free bug.

Fixes: https://tracker.ceph.com/issues/50807
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 0c143922f8a7bad0f19a0a2c97121a470b8fcba5)
src/mds/MDLog.cc