]> git.itanic.dy.fi Git - linux-stable/commit
perf unwind: Set userdata for all __report_module() paths
authorDave Rigby <d.rigby@me.com>
Thu, 18 Feb 2021 16:56:54 +0000 (16:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 May 2021 11:10:27 +0000 (13:10 +0200)
commit45aef101ca442bafb393a3c71a139b62bbaf80e4
tree3913c739ab48f97f95cde5af887c10918ce5f1e3
parent2960df32bb72050ec87fd95d8de54a8c6f288398
perf unwind: Set userdata for all __report_module() paths

commit 4e1481445407b86a483616c4542ffdc810efb680 upstream.

When locating the DWARF module for a given address, __find_debuginfo()
requires a 'struct dso' passed via the userdata argument.

However, this field is only set in __report_module() if the module is
found in via dwfl_addrmodule(), not if it is found later via
dwfl_report_elf().

Set userdata irrespective of how the DWARF module was found, as long as
we found a module.

Fixes: bf53fc6b5f41 ("perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder")
Signed-off-by: Dave Rigby <d.rigby@me.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211801
Acked-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/linux-perf-users/20210218165654.36604-1-d.rigby@me.com/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Tommi Rantala" <tommi.t.rantala@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/perf/util/unwind-libdw.c