Skip to content

Commit 4955ea2

Browse files
namhyungacmel
authored andcommitted
perf tools: Fixup off-by-one comparision in maps__find
map->end is the first addr _outside_ the a map, following the convention of vm_area_struct->vm_end. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Stephane Eranian <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 77faf4d commit 4955ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ struct map *maps__find(struct rb_root *maps, u64 ip)
752752
m = rb_entry(parent, struct map, rb_node);
753753
if (ip < m->start)
754754
p = &(*p)->rb_left;
755-
else if (ip > m->end)
755+
else if (ip >= m->end)
756756
p = &(*p)->rb_right;
757757
else
758758
return m;

0 commit comments

Comments
 (0)