[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110126074737.GA19725@linux.vnet.ibm.com>
Date: Wed, 26 Jan 2011 13:17:37 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
linux-mm@...ck.org, Arnaldo Carvalho de Melo <acme@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Christoph Hellwig <hch@...radead.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
SystemTap <systemtap@...rces.redhat.com>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC] [PATCH 2.6.37-rc5-tip 5/20] 5: Uprobes:
register/unregister probes.
* Peter Zijlstra <peterz@...radead.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.
--
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