Date: Thu, 25 Sep 2014 10:30:24 -0500 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: arch@FreeBSD.org Subject: Re: KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread Message-ID: <54243510.7090009@FreeBSD.org> In-Reply-To: <20140925074653.GP8870@kib.kiev.ua> References: <54236CD6.4050807@FreeBSD.org> <20140925074653.GP8870@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PLqg260PPcR5Pj9vMN99dXkufH61t4nL2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 9/25/2014 2:46 AM, Konstantin Belousov wrote: > On Wed, Sep 24, 2014 at 08:16:06PM -0500, Bryan Drewery wrote: >> By the way, it was mentioned to me that the interrupt assert may be >> wrong but from my understanding the thread is in an interrupt context = if >> td_intr_nesting_level>0, so the check seems fine to me. >=20 > It is wrong not due to the test for the interrupt level, but because > you must not call malloc(9) from the interrupt context at all, regardle= ss > of flags. At very least, it causes recursion on the malloc/uma locks, > but also it should damage the uma state. Ah. I understand now, the check for M_WAITOK is wrong, the KASSERT needs to move out of that. --=20 Regards, Bryan Drewery --PLqg260PPcR5Pj9vMN99dXkufH61t4nL2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUJDUWAAoJEDXXcbtuRpfPJ0sH/3fWPG9KrydXujjQtVZLUIol coibag1N5CdrMkSb9qpWId3TrPcuzZiE448snxXnpuxSyorgjFje+52qRc4ukPva 4Pl9LVRt2WsXdf8pLP9Q4HmxdEN0ple+cw8zkN0e33qngcG0hJAgGdNQhkF0PV1H 6urdrR1xvJLf3ZMpL0WQd8RHh6y0vxI+RkyOSL+52mnKweygDxGfU0UeseSqJwzC mC0MZ9sAXSXKFvF2V5rTnPLeZU0RWvW6KPCu7f93yS1eyT8zJ3EpTqslVN7C8Twx xD/jV8N9vgirMejEyrUTKBgwin3pkdu6dNqa6pxmI8FfXc4ilEq88UgHHhp31q8= =oZA2 -----END PGP SIGNATURE----- --PLqg260PPcR5Pj9vMN99dXkufH61t4nL2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54243510.7090009>