svn commit: r310335 - stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace
George V. Neville-Neil
gnn at FreeBSD.org
Tue Dec 20 19:30:22 UTC 2016
Author: gnn
Date: Tue Dec 20 19:30:21 2016
New Revision: 310335
URL: https://svnweb.freebsd.org/changeset/base/310335
Log:
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
Modified:
stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 20 18:47:02 2016 (r310334)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 20 19:30:21 2016 (r310335)
@@ -4274,8 +4274,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd,
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,
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 */
More information about the svn-src-stable
mailing list