]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/exec.c
exec: proc_exec_connector() should be called only once
[karo-tx-linux.git] / fs / exec.c
index b6e35ec818a2a55354d67ec74a6e21eefd35af00..d51f7172832b00bc553ae920cb465477c18761ae 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1404,7 +1404,6 @@ int search_binary_handler(struct linux_binprm *bprm)
                                if (bprm->file)
                                        fput(bprm->file);
                                bprm->file = NULL;
-                               proc_exec_connector(current);
                                return retval;
                        }
                        read_lock(&binfmt_lock);
@@ -1455,6 +1454,7 @@ static int exec_binprm(struct linux_binprm *bprm)
                trace_sched_process_exec(current, old_pid, bprm);
                ptrace_event(PTRACE_EVENT_EXEC, old_vpid);
                current->did_exec = 1;
+               proc_exec_connector(current);
        }
 
        return ret;