[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1295957746.28776.724.camel@laptop>
Date: Tue, 25 Jan 2011 13:15:46 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Christoph Hellwig <hch@...radead.org>,
Andi Kleen <andi@...stfloor.org>,
Oleg Nesterov <oleg@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
SystemTap <systemtap@...rces.redhat.com>,
Linux-mm <linux-mm@...r.kernel.org>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC] [PATCH 2.6.37-rc5-tip 4/20] 4: uprobes: Adding and
remove a uprobe in a rb tree.
On Thu, 2010-12-16 at 15:28 +0530, Srikar Dronamraju wrote:
> +/* Acquires uprobes_mutex */
Requires? afaict uprobes_mutex isn't actually used anywhere in this
patch.
Its use is added in the next patch.
> +static struct uprobe *uprobes_add(struct inode *inode,
> + unsigned long offset)
> +{
> + struct uprobe *uprobe, *cur_uprobe;
> +
> + __iget(inode);
> + uprobe = kzalloc(sizeof(struct uprobe), GFP_KERNEL);
> +
> + if (!uprobe) {
> + iput(inode);
> + return NULL;
> + }
> + uprobe->inode = inode;
> + uprobe->offset = offset;
> +
> + /* add to uprobes_tree, sorted on inode:offset */
> + cur_uprobe = insert_uprobe_rb_node(uprobe);
> +
> + /* a uprobe exists for this inode:offset combination*/
> + if (cur_uprobe) {
> + kfree(uprobe);
> + uprobe = cur_uprobe;
> + iput(inode);
> + } else
> + init_rwsem(&uprobe->consumer_rwsem);
> +
> + return uprobe;
> +}
--
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