]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: add assert to catch dentry ref drop during unlink
authorIgor Golikov <igolikov@ibm.com>
Wed, 27 May 2026 13:18:44 +0000 (16:18 +0300)
committerVenky Shankar <vshankar@redhat.com>
Wed, 1 Jul 2026 05:34:38 +0000 (11:04 +0530)
commit227b558f203e8ccedcea742591c78c0e1a8079ef
tree9b22a7ab06266d2aff838e86650f9506fe7bac18
parent94bf1d7087d15fe7d6c036a1ef52c4941fdffc0e
client: add assert to catch dentry ref drop during unlink

Add ceph_assert(dn->ref > 0) after Dentry::unlink() in Client::unlink()
to catch the case where internal put() calls drop the dentry reference
to zero before we proceed to detach/lru_remove.

This turns a silent use-after-free into a clean assertion failure with
a full stack trace, making it possible to catch the exact conditions
in a test environment.

Signed-off-by: Igor Golikov <igolikov@ibm.com>
Fixes: https://tracker.ceph.com/issues/74625
src/client/Client.cc