blob: 7d7c8cd865f2a1d9a3e68773c2a27ef53a1c890e [file] [log] [blame]
From 15f311fd0fd20ab3458062d284bb9c7663c3a122 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>
diff --git a/mm/mmu_context.c b/mm/mmu_context.c
index ded9081..fa3d693 100644
--- a/mm/mmu_context.c
+++ b/mm/mmu_context.c
@@ -25,6 +25,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);
@@ -32,6 +33,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.1.1