Re: [RFC 09/10] x86/mm: Rework lazy TLB to track the actual loaded mm

From: Andy Lutomirski
Date: Tue May 09 2017 - 18:54:34 EST


On Tue, May 9, 2017 at 1:41 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> On Sun, 7 May 2017, Andy Lutomirski wrote:
>> /* context.lock is held for us, so we don't need any locking. */
>> static void flush_ldt(void *current_mm)
>> {
>> + struct mm_struct *mm = current_mm;
>> mm_context_t *pc;
>>
>> - if (current->active_mm != current_mm)
>> + if (this_cpu_read(cpu_tlbstate.loaded_mm) != current_mm)
>
> While functional correct, this really should compare against 'mm'.
>

Fixed.