[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110608102957.GA10529@linux.vnet.ibm.com>
Date: Wed, 8 Jun 2011 15:59:57 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Josh Stone <jistone@...hat.com>
Cc: Stephen Wilson <wilsons@...rt.ca>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
Linux-mm <linux-mm@...ck.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Hugh Dickins <hughd@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Roland McGrath <roland@...k.frob.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v4 3.0-rc2-tip 3/22] 3: uprobes: Adding and remove a
uprobe in a rb tree.
* Josh Stone <jistone@...hat.com> [2011-06-08 00:04:39]:
> On 06/07/2011 09:12 PM, Stephen Wilson wrote:
> > Also, changing the argument order seems to solve the issue reported by
> > Josh Stone where only the uprobe with the lowest address was responding
> > (thou I did not test with perf, just lightly with the trace_event
> > interface).
>
> Makes sense, and indeed after swapping the arguments to both calls, the
> perf test I gave now works as expected. Thanks!
>
> Josh
Thanks Stephen for the fix and Josh for both reporting and confirming
that the fix works.
Stephen, Along with the parameter interchange, I also modified the
parameter name so that they dont confuse with the argument names in
match_uprobe. Otherwise 'r' in __find_uprobe would correspond to 'l' in
match_uprobe. The result is something like below.
I am resending the faulty patch with the fix and also checked in the fix
into my git tree.
--
Thanks and Regards
Srikar
diff --git a/kernel/uprobes.c b/kernel/uprobes.c
index 95c16dd..72f21db 100644
--- a/kernel/uprobes.c
+++ b/kernel/uprobes.c
@@ -363,14 +363,14 @@ static int match_uprobe(struct uprobe *l, struct uprobe *r, int *match_inode)
static struct uprobe *__find_uprobe(struct inode * inode,
loff_t offset, struct rb_node **close_match)
{
- struct uprobe r = { .inode = inode, .offset = offset };
+ struct uprobe u = { .inode = inode, .offset = offset };
struct rb_node *n = uprobes_tree.rb_node;
struct uprobe *uprobe;
int match, match_inode;
while (n) {
uprobe = rb_entry(n, struct uprobe, rb_node);
- match = match_uprobe(uprobe, &r, &match_inode);
+ match = match_uprobe(&u, uprobe, &match_inode);
if (close_match && match_inode)
*close_match = n;
@@ -412,7 +412,7 @@ static struct uprobe *__insert_uprobe(struct uprobe *uprobe)
while (*p) {
parent = *p;
u = rb_entry(parent, struct uprobe, rb_node);
- match = match_uprobe(u, uprobe, NULL);
+ match = match_uprobe(uprobe, u, NULL);
if (!match) {
atomic_inc(&u->ref);
return u;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists