panic on kldload

Sepherosa Ziehau sepherosa at
Thu Jan 10 17:23:48 PST 2008

On Jan 11, 2008 9:12 AM, Simon 'corecode' Schubert
<corecode at> wrote:
> Matthew Dillon wrote:
> >     It'l probably never be used.  There is no callback facility for
> >     recovering kmalloc'd memory.  And, particularly for the linker,
> >     there wouldn't be anything to free anyway so it would just
> >     deadlock.
> Well, yea, but I'd rather have a blocking kldload than a panic'ed
> system.  There are probably more such places.  Actually I think this
> limit business is stupid.  Rather than panicing, we could print a
> warning and go on.  The worst thing could be that we'll panic lateron
> because we don't have free memory anymore.

I don't think it's the problem of our M_WAITOK implementation.  You
could change the caller to use other kmalloc flag so that the system
will not panic; how to properly handle kmalloc failure in this case
may be difficult.

Best Regards,

Live Free or Die

More information about the Bugs mailing list