[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1279586810-29859-3-git-send-email-ddaney@caviumnetworks.com>
Date: Mon, 19 Jul 2010 17:46:50 -0700
From: David Daney <ddaney@...iumnetworks.com>
To: rostedt@...dmis.org
Cc: linux-kernel@...r.kernel.org,
David Daney <ddaney@...iumnetworks.com>
Subject: [PATCH 2/2] trace-cmd: Don't SIGSEGV in trace-graph.c:load_handle
This 'fixes' another crash I encountered. Don't try to dereference
NULL records.
Signed-off-by: David Daney <ddaney@...iumnetworks.com>
---
trace-graph.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/trace-graph.c b/trace-graph.c
index f940874..a53ab84 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -2413,6 +2413,8 @@ static int load_handle(struct graph_info *ginfo,
free_record(record);
record = tracecmd_read_cpu_last(handle, cpu);
+ if (!record)
+ continue;
if (record->ts > ginfo->end_time)
ginfo->end_time = record->ts;
--
1.7.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists