From owner-freebsd-scsi@FreeBSD.ORG Tue Dec 1 21:02:35 2009 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7AE106566B for ; Tue, 1 Dec 2009 21:02:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9FFC38FC0C for ; Tue, 1 Dec 2009 21:02:34 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id nB1Kho12001302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Dec 2009 22:43:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id nB1KhoQb038037; Tue, 1 Dec 2009 22:43:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nB1KhoGc038036; Tue, 1 Dec 2009 22:43:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Dec 2009 22:43:50 +0200 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20091201204350.GD2368@deviant.kiev.zoral.com.ua> References: <20091201180524.GB7961@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VZLKKa0PG5KXlQhV" Content-Disposition: inline In-Reply-To: <20091201180524.GB7961@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: scsi@freebsd.org Subject: Re: cd(4) M_WAITOK allocations with periph lock held X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 21:02:35 -0000 --VZLKKa0PG5KXlQhV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 01, 2009 at 08:05:25PM +0200, Jaakko Heinonen wrote: >=20 > Hi, >=20 > There are some M_WAITOK malloc invocations with periph lock held in > cd(4). Below is a link to a patch which drops the periph lock while > doing those allocations. Comments/review? >=20 > --- >=20 > Drop periph lock while allocating memory with M_WAITOK flag in > cdreportkey(), cdsendkey() and cdreaddvdstructure(). >=20 > PR: kern/130735 > Tested by: Eygene Ryabinkin >=20 > The patch against head: >=20 > http://people.freebsd.org/~jh/patches/scsi_cd-M_WAITOK-fixes.diff Would be useful for non-CAM people to put a little education into the commit log, describing why it is safe to drop the lock. --VZLKKa0PG5KXlQhV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAksVgAUACgkQC3+MBN1Mb4hDDgCfUKlTf4vaEtkgLi4QmXwbC7/P xQ4AoJJRwmIyztDzdIIQ6BCZPCD3RRXh =5x7l -----END PGP SIGNATURE----- --VZLKKa0PG5KXlQhV--