[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130325163800.GA8324@redhat.com>
Date: Mon, 25 Mar 2013 17:38:00 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Anton Arapov <anton@...hat.com>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
Josh Stone <jistone@...hat.com>,
Frank Eigler <fche@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
adrian.m.negreanu@...el.com, Torsten.Polle@....de
Subject: Re: [PATCH 5/7] uretprobes: return probe exit, invoke handlers
On 03/25, Anton Arapov wrote:
>
> On Sun, Mar 24, 2013 at 05:28:17PM +0100, Oleg Nesterov wrote:
> >
> > Ignoring the fact you need put_uprobe/kfree, it seems that we should
> > do something like this,
> >
> > do {
> > handler_uretprobe_chain(...);
> >
> > if (!ri->dirty) // not chained
> > break;
> >
> > ri = ri->next;
> > } while (ri);
> >
> > utask->return_instances = ri;
> > No?
>
> Oleg, Do you mean
>
> do {
> handler_uretprobe_chain(...);
>
> ri = ri->next;
>
> if (!ri->dirty) // not chained
> break;
> } while (ri);
>
> utask->return_instances = ri;
>
> otherwise we stuck with the first instance in stack.
Not sure I understand... but it is very possible I missed something.
But the pseudo code I wrote is not correct, I meant
utask->return_instances = ri->next;
after the main loop.
> ...and perhaps for(;;) would be 'more beautiful' here?
Oh, I would not mind either way. In fact we do not really need
ri != NULL check inside the loop (again, unless I am confused).
We must see a non-chained entry in the stack unless we have a
bug.
Oleg.
--
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