From owner-freebsd-current@FreeBSD.ORG Wed Jan 28 19:35:50 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F151065745 for ; Wed, 28 Jan 2009 19:35:50 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 0F45E8FC14 for ; Wed, 28 Jan 2009 19:35:49 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 072049CB0EC; Wed, 28 Jan 2009 20:33:21 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qG4SBv7etpsO; Wed, 28 Jan 2009 20:33:18 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A34FF9CB120; Wed, 28 Jan 2009 20:33:18 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n0SJXIY1042355; Wed, 28 Jan 2009 20:33:18 +0100 (CET) (envelope-from rdivacky) Date: Wed, 28 Jan 2009 20:33:18 +0100 From: Roman Divacky To: current@freebsd.org Message-ID: <20090128193318.GA42071@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: scottl@freebsd.org Subject: sysctl question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 19:35:50 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi we dont need Giant to be held for sysctl_ctx_init/SYSCTL_ADD_*, right? if that's true, is this ok for commit? Index: cam/scsi/scsi_da.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- cam/scsi/scsi_da.c (revision 187838) +++ cam/scsi/scsi_da.c (working copy) @@ -1086,7 +1086,6 @@ snprintf(tmpstr, sizeof(tmpstr), "CAM DA unit %d", periph->unit_number); snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); =20 - mtx_lock(&Giant); sysctl_ctx_init(&softc->sysctl_ctx); softc->flags |=3D DA_FLAG_SCTX_INIT; softc->sysctl_tree =3D SYSCTL_ADD_NODE(&softc->sysctl_ctx, @@ -1094,7 +1093,6 @@ CTLFLAG_RD, 0, tmpstr); if (softc->sysctl_tree =3D=3D NULL) { printf("dasysctlinit: unable to allocate sysctl tree\n"); - mtx_unlock(&Giant); cam_periph_release(periph); return; } @@ -1108,7 +1106,6 @@ &softc->minimum_cmd_size, 0, dacmdsizesysctl, "I", "Minimum CDB size"); =20 - mtx_unlock(&Giant); cam_periph_release(periph); } =20 Index: cam/scsi/scsi_cd.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- cam/scsi/scsi_cd.c (revision 187838) +++ cam/scsi/scsi_cd.c (working copy) @@ -555,8 +555,6 @@ snprintf(tmpstr, sizeof(tmpstr), "CAM CD unit %d", periph->unit_number); snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); =20 - mtx_lock(&Giant); - sysctl_ctx_init(&softc->sysctl_ctx); softc->flags |=3D CD_FLAG_SCTX_INIT; softc->sysctl_tree =3D SYSCTL_ADD_NODE(&softc->sysctl_ctx, @@ -565,7 +563,6 @@ =20 if (softc->sysctl_tree =3D=3D NULL) { printf("cdsysctlinit: unable to allocate sysctl tree\n"); - mtx_unlock(&Giant); cam_periph_release(periph); return; } @@ -579,7 +576,6 @@ &softc->minimum_command_size, 0, cdcmdsizesysctl, "I", "Minimum CDB size"); =20 - mtx_unlock(&Giant); cam_periph_release(periph); } =20 thnx! roman --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkmAsv0ACgkQLVEj6D3CBExieQCfY6d50qVGVfHuk6vL8Fwx5Vl5 ghEAnjDwf2i5IrVzoc9aPlOp7E2ta35Y =DA7O -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--