From: Oleg Nesterov <oleg@redhat.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>,
linux-kernel@vger.kernel.org,
"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: [PATCH 2/3] tracing/kprobes: Kill probe_enable_lock
Date: Mon, 17 Jun 2013 17:18:41 +0200 [thread overview]
Message-ID: <20130617151841.GA32267@redhat.com> (raw)
In-Reply-To: <51BE97C0.1070203@hitachi.com>
On 06/17, Masami Hiramatsu wrote:
>
> (2013/06/17 2:21), Oleg Nesterov wrote:
> > enable_trace_probe() and disable_trace_probe() should not worry about
> > serialization, the caller (perf_trace_init or __ftrace_set_clr_event)
> > holds event_mutex.
> >
> > They are also called by kprobe_trace_self_tests_init(), but this __init
> > function can't race with itself or trace_events.c
>
> Right,
> For safety, we should comment this at the caller side,
Which caller do you mean?
The patch adds
/*
* This and enable_trace_probe/disable_trace_probe rely on event_mutex
* held by the caller, __ftrace_set_clr_event().
*/
above trace_probe_nr_files() but the next patch removes this function
with the comment...
Will you agree with this patch if I add something like
/*
* called by perf_trace_init() or __ftrace_set_clr_event() under event_mutex
*/
above kprobe_register() ? Perhaps it makes sense to add
lockdep_assert_held(&event_mutex) into the body?
And:
> because
> those calls are the reason why I have introduced this lock.
Please do not hesitate to nack this patch if you think that we should
keep probe_enable_lock for safety even if it is not currently needed.
In this case I'd suggest to move lock/unlock into kprobe_register()
but this is minor.
Oleg.
next prev parent reply other threads:[~2013-06-17 15:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 17:21 [PATCH 0/3] tracing/kprobes: trace_probe->files cleanups Oleg Nesterov
2013-06-16 17:21 ` [PATCH 1/3] tracing/kprobes: Avoid perf_trace_buf_*() if ->perf_events is empty Oleg Nesterov
2013-06-17 3:41 ` zhangwei(Jovi)
2013-06-17 13:48 ` Oleg Nesterov
2013-06-17 4:33 ` Masami Hiramatsu
2013-06-16 17:21 ` [PATCH 2/3] tracing/kprobes: Kill probe_enable_lock Oleg Nesterov
2013-06-17 4:59 ` Masami Hiramatsu
2013-06-17 15:18 ` Oleg Nesterov [this message]
2013-06-18 2:49 ` Masami Hiramatsu
2013-06-18 3:41 ` Masami Hiramatsu
2013-06-18 19:24 ` Oleg Nesterov
2013-06-19 20:30 ` [PATCH v2 " Oleg Nesterov
2013-06-19 20:34 ` [PATCH] tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit() Oleg Nesterov
2013-06-20 3:54 ` Masami Hiramatsu
2013-06-20 3:35 ` [PATCH v2 2/3] tracing/kprobes: Kill probe_enable_lock Masami Hiramatsu
2013-06-16 17:21 ` [PATCH 3/3] tracing/kprobes: Turn trace_probe->files into list_head Oleg Nesterov
2013-06-17 6:20 ` Masami Hiramatsu
2013-06-17 15:30 ` Oleg Nesterov
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=20130617151841.GA32267@redhat.com \
--to=oleg@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.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.