• Andi Kleen's avatar
    [PATCH] x86_64: fix flush race on context switch · 421f4e4a
    Andi Kleen authored
    Fix a long standing race in x86-64 SMP TLB handling.  When a mm is freed and
    another thread exits to a lazy TLB thread (like idle) the freed user page
    tables would be still kept loaded in the idle thread.  When an interrupt does
    a prefetch on NULL the CPU would try to follow it and read random data. 
    
    This could lead to machine checks on Opterons in some cases.
    
    Credit goes to some unnamed debugging wizards at AMD who described the
    problem.  All blame to me.  I did the fix based on their description.
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    421f4e4a
mmu_context.h 1.83 KB