diff options
author | Levi Yun <yeoreum.yun@arm.com> | 2024-11-08 14:34:25 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-12-12 16:12:37 -0300 |
commit | 1d18ebcfd302a2005b83ae5f13df223894d19902 (patch) | |
tree | 5338c8b0d5b768e12df6d64524bcdc667d5bcc55 /drivers/misc/fastrpc.c | |
parent | 9ba3462c1ce5f1596c8f065540628cec7bdad005 (diff) | |
download | linux-1d18ebcfd302a2005b83ae5f13df223894d19902.tar.gz linux-1d18ebcfd302a2005b83ae5f13df223894d19902.tar.bz2 linux-1d18ebcfd302a2005b83ae5f13df223894d19902.zip |
perf expr: Initialize is_test value in expr__ctx_new()
When expr_parse_ctx is allocated by expr_ctx_new(),
expr_scanner_ctx->is_test isn't initialize, so it has garbage value.
this can affects the result of expr__parse() return when it parses
non-exist event literal according to garbage value.
Use calloc instead of malloc in expr_ctx_new() to fix this.
Fixes: 3340a08354ac286e ("perf pmu-events: Fix testing with JEVENTS_ARCH=all")
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20241108143424.819126-1-yeoreum.yun@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/misc/fastrpc.c')
0 files changed, 0 insertions, 0 deletions