From: Venky Shankar Date: Thu, 9 Nov 2023 10:31:26 +0000 (-0500) Subject: CephContext: acquire _fork_watchers_lock in notify_post_fork() X-Git-Tag: v18.2.5~197^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3a55e18a0ba2034331d758f94d915992132486d;p=ceph.git CephContext: acquire _fork_watchers_lock in notify_post_fork() The ceph::spin_unlock() seems incorrect here. Fixes: http://tracker.ceph.com/issues/63494 Signed-off-by: Venky Shankar (cherry picked from commit faef266331ae0e372a345ef1926c239aa6c3bf45) --- diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index d26f24511d22..68b92c45d37e 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -1042,7 +1042,7 @@ void CephContext::notify_pre_fork() void CephContext::notify_post_fork() { - ceph::spin_unlock(&_fork_watchers_lock); + std::lock_guard lg(_fork_watchers_lock); for (auto &&t : _fork_watchers) t->handle_post_fork(); }