diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-04 09:48:40 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-15 10:32:56 -0600 |
commit | 2d7a449622477723dfe24c4e8825631c2efe76d9 (patch) | |
tree | 5b4a87619811638ed932a2712ecad451d7c585d6 | |
parent | a203c35b0af3ae1aacfc531e0df74fce12b87d86 (diff) |
mm-protect-activate-switch-mm.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | fs/exec.c | 2 | ||||
-rw-r--r-- | mm/mmu_context.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c index 36254645b7cc..aabd97d8babf 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -837,10 +837,12 @@ static int exec_mmap(struct mm_struct *mm) } } task_lock(tsk); + local_irq_disable_rt(); active_mm = tsk->active_mm; tsk->mm = mm; tsk->active_mm = mm; activate_mm(active_mm, mm); + local_irq_enable_rt(); task_unlock(tsk); arch_pick_mmap_layout(mm); if (old_mm) { diff --git a/mm/mmu_context.c b/mm/mmu_context.c index cf332bc0080a..64ce279a984d 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c @@ -26,6 +26,7 @@ void use_mm(struct mm_struct *mm) struct task_struct *tsk = current; task_lock(tsk); + local_irq_disable_rt(); active_mm = tsk->active_mm; if (active_mm != mm) { atomic_inc(&mm->mm_count); @@ -33,6 +34,7 @@ void use_mm(struct mm_struct *mm) } tsk->mm = mm; switch_mm(active_mm, mm, tsk); + local_irq_enable_rt(); task_unlock(tsk); if (active_mm != mm) |