]> err.no Git - linux-2.6/commit
[PATCH] binfmt_flat: don't check for EMFILE
authorAndrew Morton <akpm@osdl.org>
Sat, 20 May 2006 22:00:01 +0000 (15:00 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 21 May 2006 19:59:17 +0000 (12:59 -0700)
commitdf88912a2165f56a7402db80126cf8ea075221fe
tree3d2246a0507cbaa56a501485d69ee936f367bc37
parent48d705522da4fa04bb0169a7ca3c9ab92e28b613
[PATCH] binfmt_flat: don't check for EMFILE

Bernd Schmidt points out that binfmt_flat is now leaving the exec file open
while the application runs.  This offsets all the application's fd numbers.
We should have closed the file within exec(), not at exit()-time.

But there doesn't seem to be a lot of point in doing all this just to avoid
going over RLIMIT_NOFILE by one fd for a few microseconds.  So take the EMFILE
checking out again.  This will cause binfmt_flat to again fail LTP's
exec-should-return-EMFILE-when-fdtable-is-full test.  That test appears to be
wrong anyway - Open Group specs say nothing about exec() returning EMFILE.

Cc: Bernd Schmidt <bernd.schmidt@analog.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/binfmt_flat.c