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

看板DFBSD_commit作者時間15年前 (2011/03/07 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
:commit 2994659f1e6c1ef260241491bceca91c9d2553b3 :Author: Venkatesh Srinivas <me@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
文章代碼(AID): #1DSylgqy (DFBSD_commit)
文章代碼(AID): #1DSylgqy (DFBSD_commit)