Messages in this thread |  | | Date | Tue, 8 Jan 2013 19:13:03 +0100 | From | Oleg Nesterov <> | Subject | Re: [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.
|  |