]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: Prevent race condition when printing Inode in ll_sync_inode
authorChengen Du <chengen.du@canonical.com>
Mon, 12 Aug 2024 07:49:57 +0000 (15:49 +0800)
committerPonnuvel Palaniyappan <pponnuvel@gmail.com>
Tue, 27 May 2025 09:08:04 +0000 (10:08 +0100)
commitc5966a29bbb8a783b9cf68d4fbbdd11cf3d140dd
tree24aaa93ca0988deb4a60124bb384b337cefbf678
parentcc80c934fd2e0e805a53c012ca02c13ff7d70e94
client: Prevent race condition when printing Inode in ll_sync_inode

In the ll_sync_inode function, the entire Inode structure is printed without
holding a lock. This can lead to a race condition when evaluating the assertion
in xlist<ObjectCacher::Object*>::size(), resulting in abnormal behavior.

Fixes: https://tracker.ceph.com/issues/67491
Co-authored-by: dongdong tao <tdd21151186@gmail.com>
Signed-off-by: Chengen Du <chengen.du@canonical.com>
(cherry picked from commit 2b78a5b3147d4e97be332ca88d286aec0ce44dc3)
src/client/Client.cc