Reported by: pho
Fixes: f7833196bd6ba9bfc060a41b353422b15d6aa95b
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Oops, I didn't realize that the mount path doesn't hold the covered vnode lock while updating the relevant fields.
It looks as though the unmount path does hold the lock across the relevant operations, so we should be safe from these fields being cleared out from under us, correct?
Would it make sense to add a comment here to that effect?
sys/kern/vfs_lookup.c | ||
---|---|---|
1263 ↗ | (On Diff #112340) | v_mounthere -> v_mountedhere |
sys/kern/vfs_lookup.c | ||
---|---|---|
1267 ↗ | (On Diff #112340) | Hmm, thinking about it a little more: |
sys/kern/vfs_lookup.c | ||
---|---|---|
1267 ↗ | (On Diff #112340) | The cost of acquire fence is zero on amd64, and somewhat more on arm64. But if this causes questions, I think we can just extend the lock region in vfs_domount(). |
cache_purge() should not be called with the vnode locked, it does vdrop() for unrelated vnodes