git: kernel -- file desc malloc zone overflow handling.

Matthew Dillon dillon at apollo.backplane.com
Sun Mar 6 09:06:01 PST 2011


:commit 2994659f1e6c1ef260241491bceca91c9d2553b3
: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
    system.

    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
    that case.

						-Matt






More information about the Commits mailing list