(2013/06/25 12:30), zhangwei(Jovi) wrote:
> @@ -605,33 +629,84 @@ typedef bool (*filter_func_t)(struct uprobe_consumer 
> *self,
>                               struct mm_struct *mm);
> 
>  static int
> -probe_event_enable(struct trace_uprobe *tu, int flag, filter_func_t filter)
> +probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file,
> +                filter_func_t filter)
>  {
> +     int enabled = 0;
>       int ret = 0;
> 
> +     /* we cannot call uprobe_register twice for same tu */
>       if (is_trace_uprobe_enabled(tu))
> -             return -EINTR;
> +             enabled = 1;
> +
> +     if (file) {
> +             struct event_file_link *link;
> +
> +             if (tu->flags & TP_FLAG_PROFILE)
> +                     return -EINTR;
> +
> +             link = kmalloc(sizeof(*link), GFP_KERNEL);
> +             if (!link)
> +                     return -ENOMEM;
> +
> +             link->file = file;
> +             list_add_rcu(&link->list, &tu->files);

Maybe, list_add_tail_rcu() ? :) (but this is a minor one)

Other parts looks good for me.

Reviewed-by: Masami Hiramatsu <masami.hiramatsu...@hitachi.com>

Thank you,

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


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

Reply via email to