multip register_uprobe
Jim Keniston
jkenisto@us.ibm.com
Fri Jul 6 18:50:00 GMT 2007
On Fri, 2007-07-06 at 09:37 -0700, Jim Keniston wrote:
> On Fri, 2007-07-06 at 18:05 +0530, Srikar Dronamraju wrote:
> > Hi Wenji,
> >
> >
> > > I am creating some test scripts based on sarikar's framework.
> > >
> > > There is one problem about register multiple times.
> > > .................
> > > probes->vaddr = vaddr;
> > > probes->pid = pid;
> > > probes->handler = handler;
> > > for (i=0; i < 3; i++) {
> > > ret = register_uprobe(probes);
> > > if (ret!=0) //of course, the first time should succeed and
> > > will failed in second time, ret = -16
> > > {
> > > I tried several possibilities:
...
>
> > > * return 0; //RESULT: same as above
> The above approach should work, assuming your cleanup function
> unregisters the probe.
>
> You have found a bug. Thanks! I will post a fix shortly.
>
Attached are a patch with the fix and a module (wenji3x.c) that
demonstrates the bug (or fix). This patch applies atop the May 26 (GMT)
uprobes patch set.
Thanks again.
Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reused-probe-fix.patch
Type: text/x-patch
Size: 818 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20070706/4140dfb5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wenji3x.c
Type: text/x-csrc
Size: 1659 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20070706/4140dfb5/attachment-0001.bin>
More information about the Systemtap
mailing list