From: Oleg Nesterov <oleg@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] tracing/kprobes: Turn trace_probe->files into list_head
Date: Mon, 1 Jul 2013 21:36:37 +0200 [thread overview]
Message-ID: <20130701193637.GA31161@redhat.com> (raw)
In-Reply-To: <1372705721.22688.13.camel@gandalf.local.home>
On 07/01, Steven Rostedt wrote:
>
> On Thu, 2013-06-20 at 19:38 +0200, Oleg Nesterov wrote:
>
> > -static int
> > -trace_probe_file_index(struct trace_probe *tp, struct ftrace_event_file *file)
> > +static struct event_file_link *
> > +find_event_file_link(struct trace_probe *tp, struct ftrace_event_file *file)
> > {
> > - struct ftrace_event_file **files;
> > - int i;
> > + struct event_file_link *link;
> >
> > - /*
> > - * Since all tp->files updater is protected by probe_enable_lock,
> > - * we don't need to lock an rcu_read_lock.
> > - */
> > - files = rcu_dereference_raw(tp->files);
> > - if (files) {
> > - for (i = 0; files[i]; i++)
> > - if (files[i] == file)
> > - return i;
> > - }
> > + list_for_each_entry(link, &tp->files, list)
> > + if (link->file == file)
> > + return link;
>
> Shouldn't that be list_for_each_entry_rcu()?
No.
This is the writer which modifies the list. enable/disable_trace_probe
should be serialized wrt each other / itself anyway, otherwise they are
buggy in any case.
Oleg.
next prev parent reply other threads:[~2013-07-01 19:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 17:37 [PATCH v2 0/4] tracing/kprobes: perf_trace_buf_*() optimization + cleanups Oleg Nesterov
2013-06-20 17:38 ` [PATCH v2 1/4] tracing/kprobes: Avoid perf_trace_buf_*() if ->perf_events is empty Oleg Nesterov
2013-06-20 17:38 ` [PATCH v2 2/4] tracing/kprobes: Kill probe_enable_lock Oleg Nesterov
2013-06-20 17:38 ` [PATCH v2 3/4] tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit() Oleg Nesterov
2013-07-01 18:55 ` Steven Rostedt
2013-07-01 19:45 ` Oleg Nesterov
2013-06-20 17:38 ` [PATCH v2 4/4] tracing/kprobes: Turn trace_probe->files into list_head Oleg Nesterov
2013-07-01 19:08 ` Steven Rostedt
2013-07-01 19:36 ` Oleg Nesterov [this message]
2013-07-01 19:55 ` Steven Rostedt
2013-06-20 18:42 ` [PATCH v2 0/4] tracing/kprobes: perf_trace_buf_*() optimization + cleanups Steven Rostedt
2013-06-21 2:25 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130701193637.GA31161@redhat.com \
--to=oleg@redhat.com \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.