From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18107 invoked by alias); 28 Jan 2011 05:00:51 -0000 Received: (qmail 18100 invoked by uid 22791); 28 Jan 2011 05:00:49 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (32.97.182.141) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Jan 2011 05:00:45 +0000 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0S4pApC028792 for ; Thu, 27 Jan 2011 23:51:36 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 7D4D1728049 for ; Fri, 28 Jan 2011 00:00:42 -0500 (EST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0S50fVA150308 for ; Fri, 28 Jan 2011 00:00:42 -0500 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0S50bTu031883 for ; Thu, 27 Jan 2011 22:00:40 -0700 Received: from linux.vnet.ibm.com ([9.124.31.43]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p0S50UB6031369; Thu, 27 Jan 2011 22:00:31 -0700 Date: Fri, 28 Jan 2011 05:00:00 -0000 From: Srikar Dronamraju To: Steven Rostedt Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Linus Torvalds , Ananth N Mavinakayanahalli , Christoph Hellwig , Masami Hiramatsu , Oleg Nesterov , LKML , SystemTap , Jim Keniston , Frederic Weisbecker , Andi Kleen , Andrew Morton , "Paul E. McKenney" Subject: Re: [RFC] [PATCH 2.6.37-rc5-tip 8/20] 8: uprobes: mmap and fork hooks. Message-ID: <20110128045353.GU19725@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20101216095714.23751.52601.sendpatchset@localhost6.localdomain6> <20101216095848.23751.73144.sendpatchset@localhost6.localdomain6> <1295957741.28776.719.camel@laptop> <1295985926.10144.61.camel@gandalf.stny.rr.com> <20110126090643.GI19725@linux.vnet.ibm.com> <1296147837.10144.79.camel@gandalf.stny.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1296147837.10144.79.camel@gandalf.stny.rr.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Scanned: Fidelis XPS MAILER X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00169.txt.bz2 * Steven Rostedt [2011-01-27 12:03:57]: > On Wed, 2011-01-26 at 14:36 +0530, Srikar Dronamraju wrote: > > > > 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. > > > > +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); > > +} > > + > > > The above is from the original patch. 'p' does not look initialized to > me. > > -- Steve > > Here is the extract from the original patch at https://lkml.org/lkml/2010/12/16/74 that I sent to LKML and I dont see p being uninitialized. + +static void search_within_subtree(struct rb_node *n, struct inode *inode, + struct list_head *tmp_list) +{ + struct rb_node *p; + + p = n->rb_left; + if (p) + __search_within_subtree(p, inode, tmp_list); + + p = n->rb_right; + if (p) + __search_within_subtree(p, inode, tmp_list); +} + However I have already agreed to remove this recursion and replace it with a rb_next() logic. -- Thanks and Regards Srikar