lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] [PATCH 2.6.37-rc5-tip 5/20] 5: Uprobes: register/unregister probes.
    * Peter Zijlstra <peterz@infradead.org> [2011-01-25 13:15:45]:

    > > +
    > > + if (atomic_read(&uprobe->ref) == 1) {
    > > + synchronize_sched();
    > > + rb_erase(&uprobe->rb_node, &uprobes_tree);
    >
    > How is that safe without holding the treelock?

    Right,
    Something like this should be good enuf right?

    if (atomic_read(&uprobe->ref) == 1) {
    synchronize_sched();
    spin_lock_irqsave(&treelock, flags);
    rb_erase(&uprobe->rb_node, &uprobes_tree);
    spin_lock_irqrestore(&treelock, flags);
    iput(uprobe->inode);
    }

    --
    Thanks and Regards
    Srikar

    PS: Last time I had goofed up with Linux-mm mailing alias.
    Hopefully this time it goes to the right list.


    \
     
     \ /
      Last update: 2011-01-26 09:03    [W:0.029 / U:28.920 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site