Date: Thu, 25 Sep 2014 10:46:53 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread Message-ID: <20140925074653.GP8870@kib.kiev.ua> In-Reply-To: <54236CD6.4050807@FreeBSD.org> References: <54236CD6.4050807@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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, regardless of flags. At very least, it causes recursion on the malloc/uma locks, but also it should damage the uma state.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140925074653.GP8870>