Fix potential race condition in linux stat(2).
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/compat/linux/linux_util.c | ||
---|---|---|
206 ↗ | (On Diff #74301) | Can we use vnode lock to guarantee liveness of the v_rdev read ? This is how it was intended. |
sys/compat/linux/linux_util.c | ||
---|---|---|
206 ↗ | (On Diff #74301) | Do we need to? I've looked at vn_isdisk(), and it doesn't seem to use the vnode lock. |
sys/compat/linux/linux_util.c | ||
---|---|---|
206 ↗ | (On Diff #74301) | It uses dev_mtx, same as you did, which is global and already contended mutex. Ok, it probably would be better to do the global sweep for vn_isdisk(), finishing mjg half-done change. |