It is currently only examined in a KASSERT(), and that's always been the
case as far as I can tell. It also seems to be omitted from the fast
paths of various locks (except for rwlock read locks, which do not have
one), so we won't catch all cases of returning to usermode with a lock
held. (I'll fix this in a future change.)
Details
Details
- Reviewers
jhb - Commits
- rS286166: Don't modify curthread->td_locks unless INVARIANTS is enabled.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think this is fine.
Recall that locks aren't inlined and none of the fast paths taken if LOCK_DEBUG is > 0. One of the things that triggers this is INVARIANTS, so there shouldn't be any missing td_lock bumps?