aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/mmu_context.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
index 166af2a8e865..04478103df37 100644
--- a/arch/x86/include/asm/mmu_context.h
+++ b/arch/x86/include/asm/mmu_context.h
@@ -53,7 +53,16 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
53 /* Stop flush ipis for the previous mm */ 53 /* Stop flush ipis for the previous mm */
54 cpumask_clear_cpu(cpu, mm_cpumask(prev)); 54 cpumask_clear_cpu(cpu, mm_cpumask(prev));
55 55
56 /* Load the LDT, if the LDT is different: */ 56 /*
57 * Load the LDT, if the LDT is different.
58 *
59 * It's possible leave_mm(prev) has been called. If so,
60 * then prev->context.ldt could be out of sync with the
61 * LDT descriptor or the LDT register. This can only happen
62 * if prev->context.ldt is non-null, since we never free
63 * an LDT. But LDTs can't be shared across mms, so
64 * prev->context.ldt won't be equal to next->context.ldt.
65 */
57 if (unlikely(prev->context.ldt != next->context.ldt)) 66 if (unlikely(prev->context.ldt != next->context.ldt))
58 load_LDT_nolock(&next->context); 67 load_LDT_nolock(&next->context);
59 } 68 }