tools/sched_ext: scx_flatcg: zero-initialize stats counter array
authorDavid Carlier <devnexen@gmail.com>
Wed, 11 Feb 2026 21:52:13 +0000 (21:52 +0000)
committerTejun Heo <tj@kernel.org>
Thu, 12 Feb 2026 17:28:02 +0000 (07:28 -1000)
commit11fece49e956ef97318177f5af15a84317594244
treeb3aada00b45f8e8144c444c46c5995bb609ebecf
parent37a93dd5c49b5fda807fd204edf2547c3493319c
tools/sched_ext: scx_flatcg: zero-initialize stats counter array

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>
tools/sched_ext/scx_flatcg.c