]> git.ipfire.org Git - thirdparty/linux.git/commit
perf kwork: Fix address sanitizer issues
authorIan Rogers <irogers@google.com>
Thu, 21 May 2026 07:24:28 +0000 (00:24 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 22 May 2026 23:51:01 +0000 (20:51 -0300)
commitca426c0f6e9cce1db51348cfc8048a42e39cfa9a
treeb6fb19b85b4a5c271abf27d62d02640985cd9923
parentfdec0a81cad5f14a7d3451a49acfa5adc898aa59
perf kwork: Fix address sanitizer issues

There is a double free in the record array due to how parse_options
will mutate the array. Fix by keeping an array that isn't
mutated. Ensure kwork_usage is freed on all paths.

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>
tools/perf/builtin-kwork.c