summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-04-15 02:39:42 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-15 00:41:21 +0400
commitd3b63d7ae04879a817bac5c0bf09749f73629d32 (patch)
tree80501b4ed6110221160b9486dd24b480c3424f41 /tools/perf/util/probe-event.h
parentdd259c5db26ccda46409dbf6efc79d5a2b259e38 (diff)
downloadlinux-d3b63d7ae04879a817bac5c0bf09749f73629d32.tar.xz
perf probe: Fix a bug that --line range can be overflow
Since line_finder.lno_s/e are signed int but line_range.start/end are unsigned int, it is possible to be overflow when converting line_range->start/end to line_finder->lno_s/e. This changes line_range.start/end and line_list.line to signed int and adds overflow checks when setting line_finder.lno_s/e. LKML-Reference: <20100414223942.14630.72730.stgit@localhost6.localdomain6> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r--tools/perf/util/probe-event.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index ab5492901708..e7ff0d02c0d4 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -74,15 +74,15 @@ struct perf_probe_event {
/* Line number container */
struct line_node {
struct list_head list;
- unsigned int line;
+ int line;
};
/* Line range */
struct line_range {
char *file; /* File name */
char *function; /* Function name */
- unsigned int start; /* Start line number */
- unsigned int end; /* End line number */
+ int start; /* Start line number */
+ int end; /* End line number */
int offset; /* Start line offset */
char *path; /* Real path name */
struct list_head line_list; /* Visible lines */