Re: [PATCH v4 06/11] tracing: add 'enable_event' and 'disable_event'event trigger commands

From: Masami Hiramatsu
Date: Thu Aug 08 2013 - 01:54:27 EST


(2013/07/30 1:41), Tom Zanussi wrote:
> +
> +static int
> +event_enable_trigger_func(struct event_command *cmd_ops, void *cmd_data,
> + char *glob, char *cmd, char *param, int enabled)
> +{
> + struct trace_array *tr = top_trace_array();

OK, here is the problem. top_trace_array() always returns the default
instance. So, following change will solve the problem.

struct trigger_iterator *iter = cmd_data;
struct trace_array *tr = iter->file->tr;

However, I think we still have a race problem on accessing event_file.

Thank you,

--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/