On Thu, 2014-01-16 at 11:52 -0800, Michael Dalton wrote: > 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@xxxxxxxxx> > Signed-off-by: Michael Dalton <mwdalton@xxxxxxxxxx> > --- > lib/average.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx> _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization