Merge branch 'linus' into sched/urgent, to resolve conflicts
[sfrench/cifs-2.6.git] / arch / x86 / mm / tlb.c
index 012d0262484894c3a2e9ee4590f41e9f5756aa3d..8dcc0607f80584748f92fe43aba9a32685fc6f9b 100644 (file)
@@ -229,6 +229,12 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
 #endif
        this_cpu_write(cpu_tlbstate.is_lazy, false);
 
+       /*
+        * The membarrier system call requires a full memory barrier and
+        * core serialization before returning to user-space, after
+        * storing to rq->curr. Writing to CR3 provides that full
+        * memory barrier and core serializing instruction.
+        */
        if (real_prev == next) {
                VM_WARN_ON(this_cpu_read(cpu_tlbstate.ctxs[prev_asid].ctx_id) !=
                           next->context.ctx_id);