The local cnts array in read_stats() is not initialized before being
accumulated into per-CPU stats, which may lead to reading garbage
values. Zero it out with memset alongside the existing stats array
initialization.
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
__u32 idx;
memset(stats, 0, sizeof(stats[0]) * FCG_NR_STATS);
+ memset(cnts, 0, sizeof(cnts));
for (idx = 0; idx < FCG_NR_STATS; idx++) {
int ret, cpu;