lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20100408155736.3d12af4f.randy.dunlap@oracle.com>
Date:	Thu, 8 Apr 2010 15:57:36 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>
Subject: kernelshark: stop segfaults

From: Randy Dunlap <randy.dunlap@...cle.com>

Keep kernelshark from segfaulting when there is no open trace file.
It segfaults in:
  Filter->graph events
  Filter->graph advanced event
  Filter->list CPUs

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 kernel-shark.c |    3 +++
 trace-filter.c |    6 ++++++
 2 files changed, 9 insertions(+)

--- trace-cmd-0.7.0.orig/kernel-shark.c
+++ trace-cmd-0.7.0/kernel-shark.c
@@ -309,6 +309,9 @@ cpus_clicked (gpointer data)
 	gboolean all_cpus;
 	guint64 *cpu_mask;
 
+	if (!info->handle)
+		return;
+
 	store = TRACE_VIEW_STORE(gtk_tree_view_get_model(trace_tree));
 
 	all_cpus = trace_view_store_get_all_cpus(store);
--- trace-cmd-0.7.0.orig/trace-filter.c
+++ trace-cmd-0.7.0/trace-filter.c
@@ -717,6 +717,9 @@ void trace_adv_filter_dialog(struct trac
 	GtkWidget *view;
 	GtkWidget *event_box;
 
+	if (!handle)
+		return;
+
 	helper = g_malloc(sizeof(*helper));
 	g_assert(helper);
 
@@ -1762,6 +1765,9 @@ void trace_filter_event_filter_dialog(st
 	gchar **systems;
 	gint *event_ids;
 
+	if (!handle)
+		return;
+
 	trace_filter_convert_filter_to_names(filter, &systems, &event_ids);
 
 	filter_event_dialog(handle, filter, all_events, systems,
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ