[PATCH] x86_64: fix flush race on context switch
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: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment