diff options
| author | Dan Carpenter <[email protected]> | 2024-02-23 17:20:13 +0300 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-03-04 17:01:17 -0800 |
| commit | dc24559472a682eb124e869cb110e7a2fd857322 (patch) | |
| tree | 0dffd61a775e02d6037c755415c893b76f830405 /tools/perf/scripts/python/flamegraph.py | |
| parent | 9602e0ce981986acf03324e13fd65abefbe90e23 (diff) | |
lib/stackdepot: off by one in depot_fetch_stack()
The stack_pools[] array has DEPOT_MAX_POOLS. The "pools_num" tracks the
number of pools which are initialized. See depot_init_pool() for more
details.
If pool_index == pools_num_cached, this will read one element beyond what
we want. If not all the pools are initialized, then the pool will be
NULL, triggering a WARN(), and if they are all initialized it will read
one element beyond the end of the array.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: b29d31885814 ("lib/stackdepot: store free stack records in a freelist")
Signed-off-by: Dan Carpenter <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions