Details
- Reviewers
markj - Commits
- rS309669: Fix a kernel panic in DTrace's rw_iswriter subroutine.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 6153 Build 6409: arc lint + arc unit
Event Timeline
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | ||
---|---|---|
4394 | I know this isn't a new bug, but I think this is wrong: lc_owner will set lowner to some non-NULL value even if the lock is held shared. For instance, owner_sx() sets *owner = (struct thread *)SX_OWNER(sx->sx_lock); and if sx has shared holders this value will be non-zero. |
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | ||
---|---|---|
4394 | Also this is somewhat incorrect as it calls into the kernel from DTrace probe context. That is, there's nothing preventing one from putting a probe on the lc_owner() implementation for a given lock class. Probably we could just blacklist those functions when FBT creates probes. |
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | ||
---|---|---|
4394 | It probably makes the most sense to split out the RW_WRITE_HELD case from the SX_EXCLUSIVE_HELD case and proceed to fix this from there. I think the blacklisting mentioned in your second comment can be done as a separate change. |
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | ||
---|---|---|
4394 | I'm not sure that's necessary? I think owner_sx() and owner_rw() just need to set owner to NULL (but keep the same return value as before) if the lock is held shared. That can probably be fixed separately too, so I don't see anything wrong with committing this as-is. |