]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/exec.c
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md
[karo-tx-linux.git] / fs / exec.c
index 4e591e20e1085e4f7bfd7f987231e25dc1088820..0039055b1fc6533c636ca98dd2b9ad73b52d5de6 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -116,7 +116,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
        if (IS_ERR(tmp))
                goto out;
 
-       file = do_filp_open(AT_FDCWD, tmp->name, &uselib_flags, LOOKUP_FOLLOW);
+       file = do_filp_open(AT_FDCWD, tmp, &uselib_flags, LOOKUP_FOLLOW);
        putname(tmp);
        error = PTR_ERR(file);
        if (IS_ERR(file))
@@ -751,13 +751,14 @@ struct file *open_exec(const char *name)
 {
        struct file *file;
        int err;
+       struct filename tmp = { .name = name };
        static const struct open_flags open_exec_flags = {
                .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
                .acc_mode = MAY_EXEC | MAY_OPEN,
                .intent = LOOKUP_OPEN
        };
 
-       file = do_filp_open(AT_FDCWD, name, &open_exec_flags, LOOKUP_FOLLOW);
+       file = do_filp_open(AT_FDCWD, &tmp, &open_exec_flags, LOOKUP_FOLLOW);
        if (IS_ERR(file))
                goto out;
 
@@ -1082,7 +1083,8 @@ int flush_old_exec(struct linux_binprm * bprm)
        bprm->mm = NULL;                /* We're using it now */
 
        set_fs(USER_DS);
-       current->flags &= ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD);
+       current->flags &=
+               ~(PF_RANDOMIZE | PF_FORKNOEXEC | PF_KTHREAD | PF_NOFREEZE);
        flush_thread();
        current->personality &= ~bprm->per_clear;