]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: place the journaler pointer under the mds_lock 41332/head
authorXiubo Li <xiubli@redhat.com>
Fri, 14 May 2021 02:38:49 +0000 (10:38 +0800)
committerXiubo Li <xiubli@redhat.com>
Fri, 14 May 2021 02:45:25 +0000 (10:45 +0800)
commit0c143922f8a7bad0f19a0a2c97121a470b8fcba5
tree7c77a1fd449480268ef948281df73db4f6575176
parentecc332248b07e786eee4ffd5035c9ea748634ebd
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>
src/mds/MDLog.cc