From: Michael Dalton Date: Fri, 17 Jan 2014 06:23:29 +0000 (-0800) Subject: lib: Ensure EWMA does not store wrong intermediate values X-Git-Tag: v3.14-rc1~94^2~114^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03144b5869d2921dafbea477246aeb5d4eb5fc38;p=pandora-kernel.git lib: Ensure EWMA does not store wrong intermediate values To ensure ewma_read() without a lock returns a valid but possibly out of date average, modify ewma_add() by using ACCESS_ONCE to prevent intermediate wrong values from being written to avg->internal. Suggested-by: Eric Dumazet Acked-by: Michael S. Tsirkin Acked-by: Eric Dumazet Signed-off-by: Michael Dalton Signed-off-by: David S. Miller --- Reading git-diff-tree failed