Repository navigation
Conversation
9372f75 to
bbdf041
Compare
bbdf041 to
5ba5fc5
Compare
51ae222 to
3800dcb
Compare
XV02
left a comment
There was a problem hiding this comment.
This is a complex change, will keep reviewing, for the time being please check this concern, if you find it wrong please discuss it on this thread :DD
XV02
left a comment
There was a problem hiding this comment.
Thanks for addressing my comment, GTG!
f9aa71c to
b2a70e4
Compare
b2a70e4 to
f97265d
Compare
|
Rebased on main after the 2.4.9.1 release and added one commit. The WORM check that this PR moved below the lookups released only one reference when both names of a rename resolve to the same entry (Unicode-equivalent names in one directory), so the entry was never disposed. The exit now releases both, as the validation block above it does. LeakSanitizer reports the leaked entry before the change and nothing after it. |
|
Hi @matejk ! We agreed that this change can be merged into our next release, 2.4.9.2. Since for the previous release process some PRs got squashed, git might be marking some changes incorrectly in this PR when we switched the base branch, if this happened please merge your branch with the release/2.4.9.2 and please confirm there are no conflicts so we can merge it with the new release branch. Thank you for your contribution! |
Piloalucard
left a comment
There was a problem hiding this comment.
Thanks for this work! LGTM!
f97265d to
2eb7281
Compare
The WORM and non-empty-directory checks ran before the lock was taken but their error paths released it. Take it first; lock order is unchanged.
After ownership moves to fromdentry, out_free freed the buffers again.
…in unlink The check needs only the child's contents_lock, so parent->meta_lock is no longer held while it is taken.
2eb7281 to
ad94699
Compare
Two commits:
ltfs_fsops_rename, the directory WORM checks ran beforetodir'smeta_lockwas acquired but their error path released it (whenevertodir != fromdir);ltfs_fsops_unlinkhad the same defect forparent->meta_lockon its WORM and non-empty-directory error paths. Releasing an unheld rwlock is undefined behaviour and can corrupt the lock state. The checks now run with the locks held; lock ordering is preserved.fromdentry, a later failure freed them viaout_freeand left dangling pointers that were freed again when the dentry is disposed. Ownership is now cleared from the locals when it moves.