lkml.org 
[lkml]   [2013]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer
(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.pt@hitachi.com>

Thank you,

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




\
 
 \ /
  Last update: 2013-06-25 12:41    [W:0.158 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site