Re: general protection fault in trace_probe_unlink
From: Steven Rostedt
Date: Tue Sep 17 2019 - 21:14:06 EST
On Tue, 17 Sep 2019 11:13:42 +0800
Hillf Danton <hdanton@xxxxxxxx> wrote:
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -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.
156869709721.22406.5153754822203046939.stgit@devnote2/">https://lore.kernel.org/lkml/156869709721.22406.5153754822203046939.stgit@devnote2/
-- Steve
> +
> 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;
> --