git: d1cbe7908986 - main - Allocating the LinuxKPI current structure from an interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea .

John Baldwin jhb at FreeBSD.org
Thu Mar 11 17:13:44 UTC 2021


On 3/10/21 2:09 AM, Hans Petter Selasky wrote:
> On 3/10/21 11:04 AM, Konstantin Belousov wrote:
>> This probably hangs machine instead of panicing.  In low memory condition,
>> you do not handle interrupt, which probably mean that the source is not
>> silenced, and after EOI the same interrupt will be generated again.
> 
> Hi,
> 
> This usually happens during boot. Another possibility is to panic()
> there. I don't see so many options.

Is there no way to pre-allocate this?  That is, could we not have all
ithreads invoke this during their initialization, and have the module
handler for linuxkpi iterate over ithreads allocating one for
each ithread during MOD_LOAD?

I think there are few enough ithreads that allocating "extra" ones
is probably ok.  Alternatively, you could hook into the path when an
interrupt is registered perhaps by passing some sort of INTR_LINUX
flag or the like that causes kern_intr.c to allocate one for the
associated ithread when the interrupt is registered.

-- 
John Baldwin


More information about the dev-commits-src-all mailing list