Skip to contentSkip to conversation

general protection fault in trace_probe_unlink

DISCUSSION Steven Rostedt 1 participant 1 message Sep 18, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

kernel/trace/trace_probe.c int trace_probe_init(struct trace_probe · line 990

Quoted 8 lines · On Tue, 17 Sep 2019 11:13:42 +0800 Hillf Danton <[email protected]> wrote:
kernel/trace/trace_probe.c +2 -0
@@ -986,6 +986,9 @@ int trace_probe_init(struct trace_probe
 	if (!tp->event)
 		return -ENOMEM;
 
+	/* shun gpf in error cleanup path */
+	INIT_LIST_HEAD(&tp->list);

Thanks, but I took Masami's patch.

https://lore.kernel.org/lkml/156869709721.22406.5153754822203046939.stgit@devnote2/

-- Steve

Quoted 13 lines
kernel/trace/trace_probe.c +1 -2
+
 	call = trace_probe_event_call(tp);
 	call->class = &tp->event->class;
 	call->name = kstrdup(event, GFP_KERNEL);
@@ -1002,7 +1005,6 @@ int trace_probe_init(struct trace_probe
 	INIT_LIST_HEAD(&tp->event->files);
 	INIT_LIST_HEAD(&tp->event->class.fields);
 	INIT_LIST_HEAD(&tp->event->probes);
-	INIT_LIST_HEAD(&tp->list);
 	list_add(&tp->event->probes, &tp->list);
 
 	return 0;
--