diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-04 09:48:40 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-03-02 11:52:28 -0600 |
commit | f02a338c5d2cedc9e761fed48649c80c97f955ca (patch) | |
tree | 5927e3948de091534baf4bfb56c4922c12754bcd | |
parent | 150d83ab178a36851f846432cb32a744fa24e8f7 (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 9c3bdad45db8..a76e92bdeabb 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) |