]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/nommu.c
NOMMU: Use copy_*_user_page() in access_process_vm()
[net-next-2.6.git] / mm / nommu.c
index a8d17521624ab57b1066755d21a25bcc419550a5..17773862619b5334832b76a062411c830e90135b 100644 (file)
@@ -1921,9 +1921,11 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
 
                /* only read or write mappings where it is permitted */
                if (write && vma->vm_flags & VM_MAYWRITE)
-                       len -= copy_to_user((void *) addr, buf, len);
+                       copy_to_user_page(vma, NULL, addr,
+                                        (void *) addr, buf, len);
                else if (!write && vma->vm_flags & VM_MAYREAD)
-                       len -= copy_from_user(buf, (void *) addr, len);
+                       copy_from_user_page(vma, NULL, addr,
+                                           buf, (void *) addr, len);
                else
                        len = 0;
        } else {