lkml.org 
[lkml]   [2010]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv11 2.6.36-rc2-tip 5/15] 5: uprobes: Uprobes (un)registration and exception handling.
From
Date
On Mon, 2010-09-06 at 23:16 +0530, Srikar Dronamraju wrote:
> > > Unlike kernel probing, uprobes has a disadvantage.
> > > Lets assume that the request for removing a probepoint when some of the
> > > threads have actually hit the probe. Because the handlers in uprobes can
> > > sleep, we cant remove the probepoint at the same time as the request for
> > > the removing the probe. This is where refcount steps in and helps us to
> > > decide when we can remove the probepoint. Even inoode based
> > > tracing or file based tracing would need it.
> >
> > Stick the refcount in the actual struct uprobe instead?
>
> What if the called does something like this when one or more
> threads are processing the breakpoint.
> unregister_uprobe(u);
> kfree(u);

That's what atomic_inc_unless_zero() and RCU are for.


\
 
 \ /
  Last update: 2010-09-06 20:19    [W:1.090 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site