From: Paul E. McKenney Date: Tue, 12 Aug 2014 17:47:48 +0000 (-0700) Subject: rcu: Avoid misordering in __call_rcu_nocb_enqueue() X-Git-Tag: fixes-against-v3.18-rc2~103^2~1^2~16^3~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39953dfd40077c7480b1d5deb4d617e086b1c865;p=pandora-kernel.git rcu: Avoid misordering in __call_rcu_nocb_enqueue() The NOCB leader wakeup ordering depends on the store to the header happening before the check for the leader already being awake. However, because atomic_long_add() does not return a value, it does not provide ordering guarantees, the incorrect comment in wake_nocb_leader() notwithstanding. This commit therefore adds a smp_mb__after_atomic() after the final atomic_long_add() to provide the needed ordering guarantee. Reported-by: Amit Shah Signed-off-by: Paul E. McKenney Tested-by: Paul Gortmaker --- Reading git-diff-tree failed