Subject: Re: M_NOWAIT during attach
To: None <tech-kern@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-kern
Date: 11/05/2007 22:45:09
On Mon, Nov 05, 2007 at 01:54:36PM -0800, Bill Stouder-Studenmund wrote:
> > Can we change this to just use M_WAITOK if the allocation doesn't happen
> > from interrupt context?
> 
> Sure. Though for attach, I think we shouldn't be attaching stuff in an
> interrupt context. I think that if we detect new hardware, we should
> trigger a thread to come along and config everything.

Yes, I was refering to other places doing allocations for that as well.
If the allocation is expected to fail due to hitting malloc limits, the
code should have checked that earlier by applying correct limits, IMO.

Joerg