diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-04 12:56:02 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-04 17:34:52 -0300 |
| commit | 8cbca8a480e15f6326ce94287570993f27a4b2d5 (patch) | |
| tree | c7b39b070cdfc6329e9a8fc47246c4ea2c5f0d81 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 66ea9de60396a4dea5276bc87025884691876c36 (diff) | |
perf sched: Fix NULL dereference in latency_runtime_event
latency_runtime_event() passes the return value of
machine__findnew_thread() directly to thread_atoms_search() at line
1216, before checking for NULL at line 1220. thread_atoms_search()
calls pid_cmp() which dereferences the thread pointer via
thread__tid(), causing a NULL pointer dereference if the allocation
fails.
All other callers of thread_atoms_search() in this file
(latency_switch_event, latency_wakeup_event,
latency_migrate_task_event) correctly check for NULL first.
Move the atoms assignment after the NULL check to match the pattern
used by the other callers.
Fixes: b91fc39f4ad7 ("perf machine: Protect the machine->threads with a rwlock")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
