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: testing/wip-pdonnell-testing-20240503.010653-debug^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=faef266331ae0e372a345ef1926c239aa6c3bf45;p=ceph-ci.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 --- diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index d26f24511d2..68b92c45d37 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(); }