OSDN Git Service

perf dlfilter: Initialize addr_location before passing it to thread__find_symbol_fb()
authorArnaldo Carvalho de Melo <acme@kernel.org>
Mon, 31 Jul 2023 09:18:56 +0000 (12:18 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Aug 2023 19:41:49 +0000 (16:41 -0300)
commit42c6dd9d23019ff339d0aca80a444eb71087050e
tree487e2d80d4ec077c7e29091119577c8fd384d18b
parentf178a76b054fd046d212c3c67745146ff191a443
perf dlfilter: Initialize addr_location before passing it to thread__find_symbol_fb()

As thread__find_symbol_fb() will end up calling thread__find_map() and
it in turn will call these on uninitialized memory:

        maps__zput(al->maps);
        map__zput(al->map);
        thread__zput(al->thread);

Fixes: 0dd5041c9a0eaf8c ("perf addr_location: Add init/exit/copy functions")
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230731091857.10681-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dlfilter.c