linux/tools
Ian Rogers c9ef786c09 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: d1c5a0e86a ("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>
2026-04-05 23:23:33 -07:00
..
accounting delayacct: fix build regression on accounting tool 2026-02-12 15:45:56 -08:00
arch tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources 2026-03-22 18:31:54 -03:00
bootconfig bootconfig: Add bootconfig tests about braces 2026-03-13 17:49:30 +09:00
bpf resolve_btfids: Fix linker flags detection 2026-03-07 08:51:51 -08:00
build tools build: Correct link flags for libopenssl 2026-03-26 14:21:56 -07:00
certs
cgroup
counter
crypto
debugging
dma
docs tools: sphinx-build-wrapper: improve its help message 2026-02-02 09:57:46 -07:00
firewire
firmware
gpio
hv
iio
include perf beauty: Move copy of fadvise.h from tools/include/ to tools/perf/trace/beauty/include/ 2026-03-31 20:23:06 -07:00
kvm/kvm_stat
laptop
leds
lib libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
memory-model
mm
net NFSD 7.0 Release Notes 2026-02-12 08:23:53 -08:00
objtool Miscellaneous objtool fixes: 2026-03-15 10:36:01 -07:00
pcmcia
perf perf cgroup: Update metric leader in evlist__expand_cgroup 2026-04-05 23:23:33 -07:00
power cpupower: Add intel_pstate turbo boost support for Intel platforms 2026-03-03 11:18:53 -07:00
rcu
sched
sched_ext tools/sched_ext: Add -fms-extensions to bpf build flags 2026-03-02 22:00:23 -10:00
scripts tools headers: Update the syscall tables and unistd.h, to support the new 'rseq_slice_yield' syscall 2026-03-05 17:20:23 -03:00
sound
spi spi: tools: Add include folder to .gitignore 2026-02-09 12:27:31 +00:00
testing hid-for-linus-2026031701 2026-03-17 13:55:51 -07:00
thermal
time
tracing
usb
verification
virtio
wmi
workqueue
writeback
Makefile