lkml.org 
[lkml]   [2013]   [Jun]   [28]   [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/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




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