Subject: Re: fdexpand() memory shortage check (Re: kern/14721)
To: Robert Elz <kre@munnari.OZ.AU>
From: None <jaromir.dolecek@artisys.cz>
List: tech-kern
Date: 12/17/2001 08:40:58
> You shouldn't really ever panic because of legitimate user process
> activity, no matter how bizarre - instead, if something is behaving
> really weirdly, and the system is suffering because of tht just SIGKILL
> it - that way it will release the resources it was hogging, and the
> rest of the system can return to sanity.
Yes, I now think that if the malloc(..., M_CANFAIL) in fdexpand()
fails, we should just exit1() as if killed by SIGKILL there
immediatelly, logging reason why. Perhaps using sigexit(p, SIGKILL)
there.
Since this is the only place where kernel could allocate bigger chunks
of memory off kmem_map, this should be sufficient protection.
Jaromir
--
Jaromir Dolecek <jaromir.dolecek@artisys.cz>
ARTISYS, s.r.o., Stursova 71, 61600 Brno, Czech Republic
phone: +420-5-41224836 / fax: +420-5-41224870 / http://www.artisys.cz