Re: Please revert git commit 1ad3dcc0

From: Andrew Morton
Date: Tue May 16 2006 - 10:02:18 EST


Bernd Schmidt <bernds_cb1@xxxxxxxxxxx> wrote:
>
> Linus, Andrew,
>
> please revert 1ad3dcc0. That was a patch to the binfmt_flat loader,
> which was motivated by an LTP testcase which checks that execve returns
> EMFILE when the file descriptor table is full.
>
> The patch is buggy: the code now keeps file descriptors open for the
> executable and its libraries, which has confused at least one
> application. It's also unnecessary, since there is no code that uses
> the file descriptor, so the new EMFILE error return is totally artificial.
>
> The reversion is
> Signed-off-by: Bernd Schmidt <bernd.schmidt@xxxxxxxxxx>
> Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxx>
> and I think Luke had no objections either.
>

I don't get it. The substance of the patch is

+ /* check file descriptor */
+ exec_fileno = get_unused_fd();
+ if (exec_fileno < 0) {
+ ret = -EMFILE;
+ goto err;
+ }
+ get_file(bprm->file);
+ fd_install(exec_fileno, bprm->file);

and that get_file() will be undone by exit(). Without this change we'll
forget to do file limit checking.

So.. please tell us much more about the problem.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/