lkml.org 
[lkml]   [2006]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Please revert git commit 1ad3dcc0
Bernd Schmidt <bernds_cb1@t-online.de> 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@analog.com>
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-16 16:05    [W:0.583 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site