diff options
| author | Ian Rogers <[email protected]> | 2024-02-09 19:17:42 -0800 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2024-02-12 12:35:26 -0800 |
| commit | 42fd623b58dbcc48310705bbf3e3d4d7c1deec29 (patch) | |
| tree | c83e8fd2ea1911d949137e0d51979a3d4675195d /tools/perf/scripts/python/bin | |
| parent | 659ad3492b913c9033d47cb406ac5754780875b6 (diff) | |
perf maps: Get map before returning in maps__find
Finding a map is done under a lock, returning the map without a
reference count means it can be removed without notice and causing
uses after free. Grab a reference count to the map within the lock
region and return this. Fix up locations that need a map__put
following this.
Signed-off-by: Ian Rogers <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: K Prateek Nayak <[email protected]>
Cc: James Clark <[email protected]>
Cc: Vincent Whitchurch <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: Changbin Du <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Liam Howlett <[email protected]>
Cc: Artem Savkov <[email protected]>
Cc: [email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions