diff options
| author | Leon Hwang <leon.hwang@linux.dev> | 2025-11-05 18:14:06 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-11-13 20:14:15 +0300 |
| commit | 6af6e49a76c9af7d42eb923703e7648cb2bf401a (patch) | |
| tree | e84d4c2eb15410e1f0a701c7c36081190e4992ee /tools/perf/scripts/python/stackcollapse.py | |
| parent | 3249e8a17e62eefef096ec3818efbb91debbf9c7 (diff) | |
| download | linux-6af6e49a76c9af7d42eb923703e7648cb2bf401a.tar.xz | |
bpf: Free special fields when update [lru_,]percpu_hash maps
As [lru_,]percpu_hash maps support BPF_KPTR_{REF,PERCPU}, missing
calls to 'bpf_obj_free_fields()' in 'pcpu_copy_value()' could cause the
memory referenced by BPF_KPTR_{REF,PERCPU} fields to be held until the
map gets freed.
Fix this by calling 'bpf_obj_free_fields()' after
'copy_map_value[,_long]()' in 'pcpu_copy_value()'.
Fixes: 65334e64a493 ("bpf: Support kptrs in percpu hashmap and percpu LRU hashmap")
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20251105151407.12723-2-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
