Prevent stale fs-store writes after lock cleanup#4678
Conversation
Reserve write versions while holding the per-path lock map mutex so cleanup cannot remove the version state between version allocation and lock reference acquisition. Add a regression test for the ordering invariant. Co-Authored-By: HAL 9000 This finding was discovered by Project Loupe
|
👋 Thanks for assigning @benthecarman as a reviewer! |
|
No issues found. I reviewed the only changed file ( The change correctly closes the race: by allocating the version and cloning the per-path lock ref within a single critical section under the I also checked for regressions introduced by the change:
The timing/ |
Reserve write versions while holding the per-path lock map mutex so cleanup cannot remove the version state between version allocation and lock reference acquisition.
Add a regression test for the ordering invariant.
Co-Authored-By: HAL 9000
This finding was discovered by Project Loupe