Immunize rcu_dereference() against crazy compiler writers
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 17 Oct 2007 06:26:04 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:46 +0000 (08:42 -0700)
commit97b430320ce7c95f0d5587c5ecc8f6a9d0c698e9
tree3f805b4351c2c4ce68b8de869320f2afc9a805d5
parentf6b450d489f2fb4e909447beacad64edb8aa0cda
Immunize rcu_dereference() against crazy compiler writers

Turns out that compiler writers are a bit more aggressive about optimizing
than one might expect.  This patch prevents a number of such optimizations
from messing up rcu_deference().  This is not merely a theoretical problem, as
evidenced by the rmb() in mce_log().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/rcupdate.h