Commit 5a7abbe9 authored by Dave Rigby's avatar Dave Rigby Committed by Zheng Zengkai
Browse files

perf unwind: Set userdata for all __report_module() paths



stable inclusion
from stable-5.10.41
commit 8d11e6ae4304a575543e5ed4cc9a20a06d34297b
bugzilla: 51890
CVE: NA

--------------------------------

commit 4e148144 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: bf53fc6b ("perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder")
Signed-off-by: default avatarDave Rigby <d.rigby@me.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211801


Acked-by: default avatarJan Kratochvil <jan.kratochvil@redhat.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/linux-perf-users/20210218165654.36604-1-d.rigby@me.com/


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Tommi Rantala" <tommi.t.rantala@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ed087c8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment