>From 4b363bf16c12b76788fbace1475123b7214ae58d Mon Sep 17 00:00:00 2001 From: Jovi Zhang <bookj...@gmail.com> Date: Wed, 11 Jul 2012 16:53:57 +0800 Subject: [PATCH] perf: fix perf-lock report coredump
Check sample type event raw_data is existed in perf.data firstly, then invoke process_raw_event, otherwise it will coredump. Signed-off-by: Jovi Zhang <bookj...@gmail.com> --- tools/perf/builtin-lock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index fd53319..4b0c230 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -860,7 +860,9 @@ static int process_sample_event(struct perf_tool *tool __used, return -1; } - process_raw_event(sample->raw_data, sample->cpu, sample->time, thread); + if (sample->raw_data) + process_raw_event(sample->raw_data, sample->cpu, sample->time, + thread); return 0; } -- 1.7.9.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/