Skip to content

Commit b48397c

Browse files
committed
Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull execve fix from Eric Biederman: "While working on my exec cleanups I found a bug in exec that I introduced by accident a couple of years ago. I apparently missed the fact that bprm->file can change. Now I have a very personal motive to clean up exec and make it more approachable. The change is just moving woud_dump to where it acts on the final bprm->file not the initial bprm->file. I have been careful and tested and verify this fix works" * 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: exec: Move would_dump into flush_old_exec
2 parents ef0d5b9 + f87d1c9 commit b48397c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,8 @@ int flush_old_exec(struct linux_binprm * bprm)
13171317
*/
13181318
set_mm_exe_file(bprm->mm, bprm->file);
13191319

1320+
would_dump(bprm, bprm->file);
1321+
13201322
/*
13211323
* Release all of the old mmap stuff
13221324
*/
@@ -1876,8 +1878,6 @@ static int __do_execve_file(int fd, struct filename *filename,
18761878
if (retval < 0)
18771879
goto out;
18781880

1879-
would_dump(bprm, bprm->file);
1880-
18811881
retval = exec_binprm(bprm);
18821882
if (retval < 0)
18831883
goto out;

0 commit comments

Comments
 (0)