git: kernel -- file desc malloc zone overflow handling.
dillon at apollo.backplane.com
Sun Mar 6 09:06:01 PST 2011
:Author: Venkatesh Srinivas <me at endeavour.zapto.org>
:Date: Sun Mar 6 05:18:24 2011 -0800
: kernel -- file desc malloc zone overflow handling.
: Allow null return from mallocs for file descriptor arrays. Fork and exec
: will ENOMEM when we cannot allocate FD arrays.
: This is only a partial solution to bug 2019.
This kinda just papers over the problem. The panic is occuring because
the system is seeing unexpected behavior... the panic is correct, we
don't want random programs to suddenly fail to be able to open() or
fork() because of other programs. That can create a worse situation
where applications making assumptions on their ability to open
file descriptors corrupt the data under their management instead of
gracefully handle it. i.e. it would probably be better to panic
instead of allow the behavior to effect everything running on the
It may seem counterproductive but I'd definitely undo this change.
If this problem were ever to occur under normal operation (where we
aren't trying to crash the box intentionally) the whole system could
destabilize, verses panic and reboot. A panic + reboot is better in
More information about the Commits