]> Git Repo - linux.git/commit
lib: Ensure EWMA does not store wrong intermediate values
authorMichael Dalton <[email protected]>
Fri, 17 Jan 2014 06:23:29 +0000 (22:23 -0800)
committerDavid S. Miller <[email protected]>
Fri, 17 Jan 2014 07:46:06 +0000 (23:46 -0800)
commit03144b5869d2921dafbea477246aeb5d4eb5fc38
treec0326022d8ccf711afb495c9c556447dfcf845b7
parenta953be53ce40440acb4740edb48577b9468d4c3d
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 <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: Michael Dalton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
lib/average.c
This page took 0.051558 seconds and 4 git commands to generate.