Re: [PATCH] kprobes: fix trace_probe flags in enable_trace_kprobe

From: Josh Poimboeuf
Date: Wed Jul 25 2018 - 09:56:46 EST


On Wed, Jul 25, 2018 at 12:28:26PM +0200, Artem Savkov wrote:
> If enable_trace_kprobe fails to enable the probe in enable_k(ret)probe
> it returns an error, but does not unset the tp flags it set previosly.

"previously"

> @@ -424,6 +423,16 @@ enable_trace_kprobe(struct trace_kprobe *tk, struct trace_event_file *file)
> else
> ret = enable_kprobe(&tk->rp.kp);
> }
> +
> + if (ret) {
> + if (file) {
> + list_del(&link->list);

Should this be list_del_rcu(), since it was added to the list with
list_add_tail_rcu()?

--
Josh