From owner-svn-src-all@freebsd.org Tue Dec 20 19:30:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDF90C892FF; Tue, 20 Dec 2016 19:30:22 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85F71FB1; Tue, 20 Dec 2016 19:30:22 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBKJULEH026351; Tue, 20 Dec 2016 19:30:21 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBKJULsD026350; Tue, 20 Dec 2016 19:30:21 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201612201930.uBKJULsD026350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Tue, 20 Dec 2016 19:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310335 - stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 19:30:22 -0000 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 */