]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf probe: Fix to die_entrypc() returns error correctly
authorMasami Hiramatsu <mhiramat@kernel.org>
Fri, 27 Nov 2020 05:48:46 +0000 (14:48 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:29:29 +0000 (08:29 +0100)
commit9cb169196f8945de79374c69bacd69716ab0eecc
treee74ec9decfab3bab815b001ac7b270e197b56518
parentbc819d487c69a504608e1ebc5c3cda34ea869b15
perf probe: Fix to die_entrypc() returns error correctly

[ Upstream commit ab4200c17ba6fe71d2da64317aae8a8aa684624c ]

Fix die_entrypc() to return error correctly if the DIE has no
DW_AT_ranges attribute. Since dwarf_ranges() will treat the case as an
empty ranges and return 0, we have to check it by ourselves.

Fixes: 91e2f539eeda ("perf probe: Fix to show function entry line as probe-able")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Link: http://lore.kernel.org/lkml/160645612634.2824037.5284932731175079426.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/dwarf-aux.c