From owner-p4-projects@FreeBSD.ORG Thu Nov 30 22:30:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BB6316A4A7; Thu, 30 Nov 2006 22:30:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED40E16A40F; Thu, 30 Nov 2006 22:30:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CC4543CA2; Thu, 30 Nov 2006 22:30:01 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1290E45696; Thu, 30 Nov 2006 23:30:10 +0100 (CET) Received: from localhost (dkx139.neoplus.adsl.tpnet.pl [83.24.27.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A554045684; Thu, 30 Nov 2006 23:29:59 +0100 (CET) Date: Thu, 30 Nov 2006 23:29:45 +0100 From: Pawel Jakub Dawidek To: Scott Long Message-ID: <20061130222945.GB28271@garage.freebsd.pl> References: <200611290826.kAT8Qf13036044@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <200611290826.kAT8Qf13036044@repoman.freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Perforce Change Reviews Subject: Re: PERFORCE change 110667 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 22:30:13 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2006 at 08:26:41AM +0000, Scott Long wrote: > http://perforce.freebsd.org/chv.cgi?CH=3D110667 >=20 > Change 110667 by scottl@scottl-x64 on 2006/11/29 08:26:07 >=20 > When traversing buses and devices, grab the sim lock at the highest > point, i.e. xptbustraverse(), instead of doing it in disjointed ways > in the lower layers. One side effect of this is that async callbacks > will be called with the sim/bus lock held already. Another side > effect is that pass device enumeration that originated in > xpt_finishedconfig() is now decoupled into a taskqueue. >=20 > Affected files ... >=20 > .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#45 edit > .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#17 edit > .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#14 edit >=20 > Differences ... >=20 > =3D=3D=3D=3D //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#45 (te= xt+ko) =3D=3D=3D=3D >=20 > @@ -2684,9 +2684,11 @@ > next_bus =3D TAILQ_NEXT(bus, links); > =20 > mtx_unlock(&xsoftc.xpt_lock); > + mtx_lock(bus->sim->mtx); > retval =3D tr_func(bus, arg); > if (retval =3D=3D 0) > return(retval); > + mtx_unlock(bus->sim->mtx); Don't you leak a lock here on return? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFFb1tZForvXbEpPzQRAtBIAKDNEWYuGytl/YfhxvbS6WEUK7lu6QCfdrUi 7eP410avTfg14XMvByhecOE= =TaXE -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--