lkml.org 
[lkml]   [2013]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] uprobes: Do not allocate current->utask unnecessary
On 01/08, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@redhat.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.



\
 
 \ /
  Last update: 2013-01-08 20:21    [W:0.337 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site