lkml.org 
[lkml]   [2013]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Re: [RFC PATCH] tracing/kprobe: Wait for disabling all running kprobe handlers
    (2013/07/09 17:07), Peter Zijlstra wrote:
    > On Tue, Jul 09, 2013 at 05:01:45PM +0900, Masami Hiramatsu wrote:
    >> + if (wait) {
    >> + /*
    >> + * synchronize with kprobe_trace_func/kretprobe_trace_func
    >> + * to ensure disabled (all running handlers are finished)
    >> + */
    >> + synchronize_sched();
    >> + kfree(link); /* Ignored if link == NULL */
    >> + }
    >
    > What's not clear to me from this comment is if we're only waiting for kfree()?
    > In that case shouldn't we use call_rcu() to free the thing? Or do we need the
    > sync_sched() for other purposes as well?

    No, this is not only for kfree, but also to ensure completing
    disabling process, because trace_remove_event_call() supposes
    that for releasing event_call related objects (Those objects
    will be accessed in the handlers).

    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-07-10 23:29    [W:2.996 / U:0.620 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site