summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index e618a3f18..835d77136 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -395,7 +395,7 @@ static int exec_mmap(void)
mm = mm_alloc();
if (mm) {
- struct mm_struct *active_mm = current->active_mm;
+ struct mm_struct *active_mm;
if (init_new_context(current, mm)) {
mmdrop(mm);
@@ -409,6 +409,7 @@ static int exec_mmap(void)
spin_unlock(&mmlist_lock);
task_lock(current);
+ active_mm = current->active_mm;
current->mm = mm;
current->active_mm = mm;
task_unlock(current);