All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer
Date: Fri, 28 Jun 2013 14:56:54 +0900	[thread overview]
Message-ID: <51CD25A6.2030907@hitachi.com> (raw)
In-Reply-To: <51CD0E5D.3050605@hitachi.com>

(2013/06/28 13:17), Masami Hiramatsu wrote:
> (2013/06/28 1:27), Oleg Nesterov wrote:
>> On 06/27, Srikar Dronamraju wrote:
>>>
>>> * zhangwei(Jovi) <jovi.zhangwei@huawei.com> [2013-06-25 11:30:20]:
>>>> +	if (!enabled) {
>>>> +		tu->consumer.filter = filter;
>>>> +		ret = uprobe_register(tu->inode, tu->offset, &tu->consumer);
>>>> +		if (ret)
>>>> +			tu->flags &= file ? ~TP_FLAG_TRACE : ~TP_FLAG_PROFILE;
>>>
>>> Dont we need to free link here? or where does the link that got
>>> allocated freed?
>>
>> Agreed...
>>
>> Masami, it seems that (just in case, with or without "Turn trace_probe->files
>> into list_head" I sent) trace_kpobes needs the similar fix too? Plus it should
>> clear TP_FLAG_* if enable_k.*probe() fails.
> 
> Oops, right! this problem also happens on the latest kernel. I must fix that
> before introducing list_head...
> 
>> Or enable_trace_probe() assumes that enable_kprobe() must succeed? In this
>> case probably WARN_ON(ret) makes sense.
> 
> In the case of probing a module function, the event can be gone when the
> module is unloaded. At that time, enable_trace_probe must fails.

Hmm, I've looked into it carefully, and found that the enable_kprobe() must succeed
because the enable_trace_probe() invokes it after checking the failure conditions
(kprobe is registered and not gone). But anyway, that depends on the current
implementation. I think we need both of WARN_ON() and writeback.

Thank you,

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



  reply	other threads:[~2013-06-28  5:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  3:30 [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer zhangwei(Jovi)
2013-06-25 10:18 ` Masami Hiramatsu
2013-06-25 20:24 ` Oleg Nesterov
2013-06-27 12:12 ` Srikar Dronamraju
2013-06-27 16:27   ` Oleg Nesterov
2013-06-28  4:17     ` Masami Hiramatsu
2013-06-28  5:56       ` Masami Hiramatsu [this message]
2013-06-28 13:04         ` [PATCH] tracing/kprobe: Recover old array if fails to enable kprobe Masami Hiramatsu
2013-06-28 14:27           ` Oleg Nesterov
2013-06-28 14:43             ` Steven Rostedt
2013-06-28 18:43               ` Oleg Nesterov
2013-06-30  7:46                 ` Masami Hiramatsu
2013-07-02 23:02                   ` Steven Rostedt
2013-07-03  2:10                     ` Masami Hiramatsu
2013-06-28 11:51       ` [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer Steven Rostedt
2013-06-28 12:14         ` Masami Hiramatsu
2013-06-28 10:59   ` zhangwei(Jovi)

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=51CD25A6.2030907@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=fweisbec@gmail.com \
    --cc=jovi.zhangwei@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.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.