Re: Please revert git commit 1ad3dcc0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bernd Schmidt <[email protected]> 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 <[email protected]>
> Signed-off-by: Greg Ungerer <[email protected]>
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux