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 8/20] 8: uprobes: mmap and fork hooks.
    * Steven Rostedt <rostedt@goodmis.org> [2011-01-25 15:05:26]:

    > On Tue, 2011-01-25 at 13:15 +0100, Peter Zijlstra wrote:
    > > On Thu, 2010-12-16 at 15:28 +0530, Srikar Dronamraju wrote:
    >
    > > > +static void search_within_subtree(struct rb_node *n, struct inode *inode,
    > > > + struct list_head *tmp_list)
    > > > +{
    > > > + struct rb_node *p;
    > > > +
    > > > + if (p)
    > > > + __search_within_subtree(p, inode, tmp_list);
    > > > +
    > > > + p = n->rb_right;
    > > > + if (p)
    > > > + __search_within_subtree(p, inode, tmp_list);
    > > > +}
    > >
    > > Whee recursion FTW!, you just blew your kernel stack :-)
    > >
    > > Since you sort inode first, offset second, I think you can simply look
    > > for the first matching inode entry and simply rb_next() until you don't
    > > match.
    >
    > Not to mention that p is uninitialized. Did this code ever work?

    I think the original patch that I sent had p initialized. I think it got
    dropped off by Peter when he replied. Please do confirm.


    --
    Thanks and Regards
    Srikar


    \
     
     \ /
      Last update: 2011-01-26 10:15    [W:0.020 / U:5.056 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site