Skip to content

Commit

Permalink
uprobes: Fix the wrong usage of current->utask in uprobe_copy_process()
Browse files Browse the repository at this point in the history
Commit aa59c53 "uprobes: Change uprobe_copy_process() to dup
xol_area" has a stupid typo, we need to setup t->utask->vaddr but
the code wrongly uses current->utask.

Even with this bug dup_xol_work() works "in practice", but only
because get_unmapped_area(NULL, TASK_SIZE - PAGE_SIZE) likely
returns the same address every time.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
  • Loading branch information
Oleg Nesterov committed Nov 9, 2013
1 parent f72d41f commit 70d7f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ void uprobe_copy_process(struct task_struct *t, unsigned long flags)
if (!work)
return uprobe_warn(t, "dup xol area");

utask->vaddr = area->vaddr;
t->utask->vaddr = area->vaddr;
init_task_work(work, dup_xol_work);
task_work_add(t, work, true);
}
Expand Down

0 comments on commit 70d7f98

Please sign in to comment.