aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>2016-12-07 07:27:47 +0000
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>2016-12-07 07:27:47 +0000
commitaf463464cf02b9640d7bc68d76912bd05a1be3f9 (patch)
tree6897ff2b1d0792f61b9f3625b2e1e16142ce3e1c /sys
parentd0155f67a39a9d5aca483358024c29757d69cd0c (diff)
downloadsrc-af463464cf02b9640d7bc68d76912bd05a1be3f9.tar.gz
src-af463464cf02b9640d7bc68d76912bd05a1be3f9.zip
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 MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8718
Notes
Notes: svn path=/head/; revision=309669
Diffstat (limited to 'sys')
-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 c035e79abcb5..c47fb9b65398 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -4391,8 +4391,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:
@@ -4403,8 +4403,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 */