]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86_64: Fix mce_log
authorMike Waychison <mikew@google.com>
Thu, 29 Sep 2005 22:01:27 +0000 (00:01 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Sep 2005 22:41:42 +0000 (15:41 -0700)
commita6abc6d85f1356e8107d99b4ef53322c569456f1
tree253112e894c11c37a52ac93fe0f470fe990c2c18
parent070182ad9e9d437ef3711b8dc364456736ec1a45
[PATCH] x86_64: Fix mce_log

The attempt to fixup the lockless mce log buffer introduced an infinite loop
when trying to find a free entry.

And:

Using rcu_dereference() to load mcelog.next doesn't seem to be sufficient
enough to ensure that mcelog.next is loaded each time around the loop in
mce_log().  Instead, use an explicit rmb() to ensure that the compiler gets it
right.

AK: turned the smp_wmbs into true wmbs to make sure they are not
reordered by the compiler on UP.

Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/mce.c