Commit 0cfc4052 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Pass correct task to get_user_pages in ptrace

From: Andi Kleen <ak@suse.de>

ptrace/access_process_vm was passing current to get_user_pages as task, but
it should have been clearly the child task instead.

This fixes the fault accounting in ptrace and the vsyscall debugging on
x86-64 (it needs the correct task_struct to map the vsyscall pages)
parent ff98143b
......@@ -168,7 +168,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
int bytes, ret, offset;
void *maddr;
ret = get_user_pages(current, mm, addr, 1,
ret = get_user_pages(tsk, mm, addr, 1,
write, 1, &page, &vma);
if (ret <= 0)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment