[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130108181303.GB1048@redhat.com>
Date: Tue, 8 Jan 2013 19:13:03 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anton Arapov <anton@...hat.com>,
Frank Eigler <fche@...hat.com>,
Josh Stone <jistone@...hat.com>,
"Suzuki K. Poulose" <suzuki@...ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] uprobes: Do not allocate current->utask unnecessary
On 01/08, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@...hat.com> [2012-12-31 18:52:29]:
>
> > static void handle_swbp(struct pt_regs *regs)
> > {
> > - struct uprobe_task *utask;
> > struct uprobe *uprobe;
> > unsigned long bp_vaddr;
> > int uninitialized_var(is_swbp);
> > @@ -1512,19 +1515,12 @@ static void handle_swbp(struct pt_regs *regs)
> > if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags)))
> > goto out;
> >
> > - utask = get_utask();
> > - if (!utask)
> > - goto out; /* re-execute the instruction. */
> > -
>
> If get_utask fails with the above change, Dont we end up calling
> handler_chain twice(or more)?.
After restart, yes.
> I think this is probably true with
> previous patch too.
And this can happen with the current code too, if xol_alloc_area()
fails. So I think this is probably fine. Besides, if GFP_KERNEL
fails the task should be oom-killed in practice.
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