Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2009 22:43:50 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Jaakko Heinonen <jh@freebsd.org>
Cc:        scsi@freebsd.org
Subject:   Re: cd(4) M_WAITOK allocations with periph lock held
Message-ID:  <20091201204350.GD2368@deviant.kiev.zoral.com.ua>
In-Reply-To: <20091201180524.GB7961@a91-153-117-195.elisa-laajakaista.fi>
References:  <20091201180524.GB7961@a91-153-117-195.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091201204350.GD2368>