[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130325123121.GA28660@redhat.com>
Date: Mon, 25 Mar 2013 13:31:21 +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
The last comment, I promise ;)
On 03/24, Oleg Nesterov wrote:
>
> On 03/22, Anton Arapov wrote:
> >
> > +static void handle_uretprobe(struct xol_area *area, struct pt_regs *regs)
> > +{
> > + struct uprobe_task *utask;
> > + struct return_instance *ri, *tmp;
> > + unsigned long prev_ret_vaddr;
> > +
> > + utask = get_utask();
> > + if (!utask)
> > + return;
> > +
> > + ri = utask->return_instances;
> > + if (!ri)
> > + return;
>
> Hmm. I am wondering what should the caller (handle_swbp) do in this
> case...
And you do not actually need get_utask(), just check current->utask.
handle_uretprobe() must not be called if either ->utask or
->return_instances is NULL. This can only happen if we have a bug,
or user-space tries to fool the kernel.
Perhaps it makes sense to add pr_warn().
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