summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2016-12-20 19:30:21 +0000
committergnn <gnn@FreeBSD.org>2016-12-20 19:30:21 +0000
commitf441c58f6c4fd1984a8b5d3fa5cd867cfc69e381 (patch)
tree50befeb4c97f7400f4f565bcd2ceb023403a990f /sys/cddl
parent5948c02144da73dcafa58f0d42027e46598f7cd3 (diff)
downloadFreeBSD-src-f441c58f6c4fd1984a8b5d3fa5cd867cfc69e381.zip
FreeBSD-src-f441c58f6c4fd1984a8b5d3fa5cd867cfc69e381.tar.gz
MFC: 309669
Fix a kernel panic in DTrace's rw_iswriter subroutine. On FreeBSD the sense of rw_write_held() and rw_iswriter() were reversed, probably due to a cut and paste error. Using rw_iswriter() would cause the kernel to panic. Reviewed by: markj Sponsored by: DARPA, AFRL
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index 7317f97..0d9c1e3 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -4274,8 +4274,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
break;
}
l.lx = dtrace_loadptr(tupregs[0].dttk_value);
- LOCK_CLASS(l.li)->lc_owner(l.li, &lowner);
- regs[rd] = (lowner == curthread);
+ regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) &&
+ lowner != NULL;
break;
case DIF_SUBR_RW_ISWRITER:
@@ -4286,8 +4286,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs,
break;
}
l.lx = dtrace_loadptr(tupregs[0].dttk_value);
- regs[rd] = LOCK_CLASS(l.li)->lc_owner(l.li, &lowner) &&
- lowner != NULL;
+ LOCK_CLASS(l.li)->lc_owner(l.li, &lowner);
+ regs[rd] = (lowner == curthread);
break;
#endif /* illumos */
OpenPOWER on IntegriCloud