blob: 30d1cf5da8d93d5a0f3286221f325739940dd1d4 [file] [log] [blame]
From 93cf8c720d144028921366c5bbd3158bd3b43618 Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Wed, 19 Jan 2011 22:52:26 -0500
Subject: [PATCH] mmu_context: add preempt_disable to use_mm()
This is one of several extractions from the merge up to 33-rc8.
See it in a git tip repo with:
git diff 5f854cfc024622e4aae14d7cf422f6ff86278688^2 \
5f854cfc024622e4aae14d7cf422f6ff86278688 mm/mmu_context.c
You can find the origin of this change in the tip merge commit:
commit 5f854cfc024622e4aae14d7cf422f6ff86278688
Merge: cc24da0 4ec62b2
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Sun Feb 21 20:17:22 2010 +0100
Forward to 2.6.33-rc8
Merge branch 'linus' into rt/head with a pile of conflicts.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Normally there are not significant changes/additions in a merge commit that
are not from any other "normal" commit. But in this case there are, so
break them out into separate explicit commits.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
mm/mmu_context.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/mm/mmu_context.c b/mm/mmu_context.c
index 9e82e93..bde2996 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);
+ preempt_disable();
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);
+ preempt_enable();
task_unlock(tsk);
if (active_mm != mm)
--
1.7.0.4