diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-03-14 02:44:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-14 02:44:11 -0400 |
commit | cd593accdcc27ccbe6498d9ad1c2b6cc8e1d830d (patch) | |
tree | 9424d3ac86e753706cc6c3d7e6072d2a73711e29 /tools/perf/util/probe-finder.c | |
parent | 11b91d6fe7272452c999573bab33c15c2f03dc31 (diff) | |
parent | fde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff) |
Merge tag 'v3.3-rc7' into x86/mce
Merge reason: Update from an ancient -rc1 base to an almost-final stable kernel.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r-- | tools/perf/util/probe-finder.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 5d732621a462..74bd2e63c4b4 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -672,7 +672,7 @@ static int find_variable(Dwarf_Die *sc_die, struct probe_finder *pf) | |||
672 | static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr, | 672 | static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr, |
673 | bool retprobe, struct probe_trace_point *tp) | 673 | bool retprobe, struct probe_trace_point *tp) |
674 | { | 674 | { |
675 | Dwarf_Addr eaddr; | 675 | Dwarf_Addr eaddr, highaddr; |
676 | const char *name; | 676 | const char *name; |
677 | 677 | ||
678 | /* Copy the name of probe point */ | 678 | /* Copy the name of probe point */ |
@@ -683,6 +683,16 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr, | |||
683 | dwarf_diename(sp_die)); | 683 | dwarf_diename(sp_die)); |
684 | return -ENOENT; | 684 | return -ENOENT; |
685 | } | 685 | } |
686 | if (dwarf_highpc(sp_die, &highaddr) != 0) { | ||
687 | pr_warning("Failed to get end address of %s\n", | ||
688 | dwarf_diename(sp_die)); | ||
689 | return -ENOENT; | ||
690 | } | ||
691 | if (paddr > highaddr) { | ||
692 | pr_warning("Offset specified is greater than size of %s\n", | ||
693 | dwarf_diename(sp_die)); | ||
694 | return -EINVAL; | ||
695 | } | ||
686 | tp->symbol = strdup(name); | 696 | tp->symbol = strdup(name); |
687 | if (tp->symbol == NULL) | 697 | if (tp->symbol == NULL) |
688 | return -ENOMEM; | 698 | return -ENOMEM; |