uprobes: Fix the wrong usage of current->utask in uprobe_copy_process()
Commit aa59c53fd4
"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>
This commit is contained in:
parent
f72d41fa90
commit
70d7f98722
1 changed files with 1 additions and 1 deletions
|
@ -1447,7 +1447,7 @@ void uprobe_copy_process(struct task_struct *t, unsigned long flags)
|
||||||
if (!work)
|
if (!work)
|
||||||
return uprobe_warn(t, "dup xol area");
|
return uprobe_warn(t, "dup xol area");
|
||||||
|
|
||||||
utask->vaddr = area->vaddr;
|
t->utask->vaddr = area->vaddr;
|
||||||
init_task_work(work, dup_xol_work);
|
init_task_work(work, dup_xol_work);
|
||||||
task_work_add(t, work, true);
|
task_work_add(t, work, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue