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)
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;