Don't crap into descriptor table in binfmt_som

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 2, 2009 - 10:08 pm

Gitweb:     http://git.kernel.org/linus/d9e66c7296f3a39f6ac847f11ada8ddf10a4f8b1
Commit:     d9e66c7296f3a39f6ac847f11ada8ddf10a4f8b1
Parent:     d0f35dde6e748fa1a3f5d8e23a200ad1d5a4a749
Author:     Al Viro <viro@zeniv.linux.org.uk>
AuthorDate: Sun Mar 29 16:34:56 2009 -0400
Committer:  Al Viro <viro@zeniv.linux.org.uk>
CommitDate: Tue Mar 31 23:00:28 2009 -0400

    Don't crap into descriptor table in binfmt_som
    
    Same story as in binfmt_elf, except that in binfmt_som we
    actually forget to close the sucker.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/binfmt_som.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c
index 08644a6..eff74b9 100644
--- a/fs/binfmt_som.c
+++ b/fs/binfmt_som.c
@@ -188,7 +188,6 @@ out:
 static int
 load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
 {
-	int som_exec_fileno;
 	int retval;
 	unsigned int size;
 	unsigned long som_entry;
@@ -220,12 +219,6 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
 		goto out_free;
 	}
 
-	retval = get_unused_fd();
-	if (retval < 0)
-		goto out_free;
-	get_file(bprm->file);
-	fd_install(som_exec_fileno = retval, bprm->file);
-
 	/* Flush all traces of the currently running executable */
 	retval = flush_old_exec(bprm);
 	if (retval)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Don't crap into descriptor table in binfmt_som, Linux Kernel Mailing ..., (Thu Apr 2, 10:08 pm)