diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-09-30 20:08:56 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-30 20:08:56 +0200 |
commit | 9d3ec7a0c41d010153c9d20577cb1bcf9c4f65df (patch) | |
tree | 6966bd046c7029df48942bd9cc057f5eccfe5112 | |
parent | 47ea91b4052d9e94b9dca5d7a3d947fbebd07ba9 (diff) | |
parent | 8e303f20f4b3611615118a22a737fd2dc7c4ef81 (diff) | |
download | blackbird-op-linux-9d3ec7a0c41d010153c9d20577cb1bcf9c4f65df.tar.gz blackbird-op-linux-9d3ec7a0c41d010153c9d20577cb1bcf9c4f65df.zip |
Merge branch 'perf/urgent' of git://github.com/acmel/linux into perf/urgent
-rw-r--r-- | tools/perf/util/evsel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index c5748c52318f..e389815078d3 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -449,6 +449,8 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, } if (type & PERF_SAMPLE_RAW) { + const u64 *pdata; + u.val64 = *array; if (WARN_ONCE(swapped, "Endianness of raw data not corrected!\n")) { @@ -462,11 +464,12 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, return -EFAULT; data->raw_size = u.val32[0]; + pdata = (void *) array + sizeof(u32); - if (sample_overlap(event, &u.val32[1], data->raw_size)) + if (sample_overlap(event, pdata, data->raw_size)) return -EFAULT; - data->raw_data = &u.val32[1]; + data->raw_data = (void *) pdata; } return 0; |