diff options
| author | Ian Rogers <irogers@google.com> | 2026-04-03 23:05:52 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-04-05 23:23:33 -0700 |
| commit | c9ef786c0970991578397043f1c819229e2b7197 (patch) | |
| tree | b09d783b040faabdacf4c1a833bfda6e2c5c506e /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | aeae075a0352eb6ab363fb1910f209eaa296a175 (diff) | |
perf cgroup: Update metric leader in evlist__expand_cgroup
When the evlist is expanded the metric leader wasn't being updated. As
the original evsel is deleted this creates a use-after-free in
stat-shadow's prepare_metric. This was detected running the "perf stat
--bpf-counters --for-each-cgroup test" with sanitizers.
The change itself puts the copied evsel into the priv field (known
unused because of evsel__clone use) and then in a second pass over the
list updates the copied values using the priv pointer.
Fixes: d1c5a0e86a4e ("perf stat: Add --for-each-cgroup option")
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Sun Jian <sun.jian.kdev@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
