Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.25-git9 /fs/binfmt_misc.c

Filename:/fs/binfmt_misc.c
Lines Added:1
Lines Deleted:17
Also changed in: (Previous) 2.6.25-git8  2.6.24  2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5 
(Following) 2.6.25-git10  2.6.25-git11  2.6.25-git12  2.6.25-git13  2.6.25-git14  2.6.25-git15 

Location
[  2.6.25-git9
  [  fs
     o  binfmt_misc.c

Patch

diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index b53c7e5..dbf0ac0 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -110,7 +110,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
    char *iname_addr = iname;
    int retval;
    int fd_binary = -1;
-   struct files_struct *files = NULL;
 
    retval = -ENOEXEC;
    if (!enabled)
@@ -133,21 +132,13 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 
    if (fmt->flags & MISC_FMT_OPEN_BINARY) {
 
-      files = current->files;
-      retval = unshare_files();
-      if (retval < 0)
-         goto _ret;
-      if (files == current->files) {
-         put_files_struct(files);
-         files = NULL;
-      }
       /* if the binary should be opened on behalf of the
        * interpreter than keep it open and assign descriptor
        * to it */
        fd_binary = get_unused_fd();
        if (fd_binary < 0) {
           retval = fd_binary;
-          goto _unshare;
+          goto _ret;
        }
        fd_install(fd_binary, bprm->file);
 
@@ -205,10 +196,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
    if (retval < 0)
       goto _error;
 
-   if (files) {
-      put_files_struct(files);
-      files = NULL;
-   }
 _ret:
    return retval;
 _error:
@@ -216,9 +203,6 @@ _error:
       sys_close(fd_binary);
    bprm->interp_flags = 0;
    bprm->interp_data = 0;
-_unshare:
-   if (files)
-      reset_files_struct(current, files);
    goto _ret;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.