summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMichael Dalton <mwdalton@google.com>2014-01-16 22:23:29 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-16 23:46:06 -0800
commit03144b5869d2921dafbea477246aeb5d4eb5fc38 (patch)
treec0326022d8ccf711afb495c9c556447dfcf845b7 /crypto
parenta953be53ce40440acb4740edb48577b9468d4c3d (diff)
downloadop-kernel-dev-03144b5869d2921dafbea477246aeb5d4eb5fc38.zip
op-kernel-dev-03144b5869d2921dafbea477246aeb5d4eb5fc38.tar.gz
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 <eric.dumazet@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Michael Dalton <mwdalton@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud