diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2015-11-25 11:34:32 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-11-25 20:36:35 +0100 |
commit | 4d3b16269059eee12dc572848191c8e4e7bd24b3 (patch) | |
tree | 9eca24ef311d1ba2d8cc4167f281879f02dbe50f /tools/build | |
parent | tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit mac... (diff) | |
download | linux-4d3b16269059eee12dc572848191c8e4e7bd24b3.tar.xz linux-4d3b16269059eee12dc572848191c8e4e7bd24b3.zip |
perf probe: Fix to free temporal Dwarf_Frame correctly
The commit 05c8d802fa52 ("perf probe: Fix to free temporal Dwarf_Frame")
tried to fix the memory leak of Dwarf_Frame, but it released the frame
at wrong point. Since the dwarf_frame_cfa(frame, &pf->fb_ops, &nops) can
return an address inside the frame data structure to pf->fb_ops, we can
not release the frame before using pf->fb_ops.
This reverts the commit and releases the frame afterwards (right before
returning from call_probe_finder) correctly.
Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 05c8d802fa52 ("perf probe: Fix to free temporal Dwarf_Frame")
LPU-Reference: 20151125103432.1473.31009.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
0 files changed, 0 insertions, 0 deletions