aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index de5c16c6b6ec..068ffe007529 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -431,6 +431,7 @@ void mmput(struct mm_struct *mm)
431 if (atomic_dec_and_test(&mm->mm_users)) { 431 if (atomic_dec_and_test(&mm->mm_users)) {
432 exit_aio(mm); 432 exit_aio(mm);
433 exit_mmap(mm); 433 exit_mmap(mm);
434 set_mm_exe_file(mm, NULL);
434 if (!list_empty(&mm->mmlist)) { 435 if (!list_empty(&mm->mmlist)) {
435 spin_lock(&mmlist_lock); 436 spin_lock(&mmlist_lock);
436 list_del(&mm->mmlist); 437 list_del(&mm->mmlist);
@@ -543,6 +544,8 @@ struct mm_struct *dup_mm(struct task_struct *tsk)
543 if (init_new_context(tsk, mm)) 544 if (init_new_context(tsk, mm))
544 goto fail_nocontext; 545 goto fail_nocontext;
545 546
547 dup_mm_exe_file(oldmm, mm);
548
546 err = dup_mmap(mm, oldmm); 549 err = dup_mmap(mm, oldmm);
547 if (err) 550 if (err)
548 goto free_pt; 551 goto free_pt;