perf_event: Fix raw event processing
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Mon, 7 Dec 2009 04:06:29 +0000 (12:06 +0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 7 Dec 2009 05:26:24 +0000 (06:26 +0100)
commitd8bd9e0aedabcb47887712497bc386a06ddcbd12
treeb8fbdb8987323a3b572554ebe00487d444abfec4
parentc0777c5aa835a97ccc77d82e55388940f0140a61
perf_event: Fix raw event processing

We use 'data.raw_data' parameter to call process_raw_event(),
but data.raw_data buffer not include data size. it can make perf
tool crash.

This bug was introduced by commit 180f95e29a ("perf: Make common
SAMPLE_EVENT parser").

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4B1C7F45.5080105@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-kmem.c
tools/perf/builtin-sched.c