Files
linux/tools/perf/util
Ian Rogers e898c505b0 perf kwork: Fix memory management of kwork_work
This commit addresses several memory management issues in builtin-kwork.c:

1. Implements a global cleanup function perf_kwork__exit to free all
   kwork_work and kwork_atom_page objects at the end of the command.

2. Ensures all 'name' fields in struct kwork_work are malloc-ed (or NULL)
   and properly freed by using strdup and zfree.

3. Fixes memory leaks in top_merge_tasks where kwork_work objects were
   dropped without being freed.

4. Adds robustness with NULL checks for name fields.

5. Fixes workqueue_work_init to correctly resolve and strdup kernel
   function names, preventing bad-free errors.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-05-22 20:51:59 -03:00
..
2026-01-13 17:03:25 -03:00
2026-01-13 17:03:25 -03:00
2026-03-13 14:13:02 -07:00
2025-06-09 11:18:17 -07:00
2026-04-02 19:35:16 -07:00
2023-03-14 08:29:46 -03:00
2024-08-19 14:52:13 -03:00
2023-01-23 10:00:47 -03:00
2026-04-05 22:30:52 -07:00
2024-08-12 18:05:14 -03:00
2024-08-19 14:51:46 -03:00
2025-05-02 15:36:14 -03:00
2025-02-10 11:46:02 -08:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2025-12-17 09:30:37 -03:00
2026-04-12 12:12:11 -07:00
2026-03-26 15:22:18 -07:00
2025-07-11 12:36:40 -07:00
2025-07-11 12:36:40 -07:00
2024-12-12 15:53:36 -03:00
2025-06-09 11:18:18 -07:00
2025-07-26 16:31:43 -07:00
2025-09-19 12:14:29 -03:00
2023-04-10 19:20:53 -03:00
2024-09-27 15:38:52 -03:00