aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 2e140a6ae22e..829fc904de11 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1258,9 +1258,9 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
1258 len = vma->vm_end - addr; 1258 len = vma->vm_end - addr;
1259 1259
1260 /* only read or write mappings where it is permitted */ 1260 /* only read or write mappings where it is permitted */
1261 if (write && vma->vm_flags & VM_WRITE) 1261 if (write && vma->vm_flags & VM_MAYWRITE)
1262 len -= copy_to_user((void *) addr, buf, len); 1262 len -= copy_to_user((void *) addr, buf, len);
1263 else if (!write && vma->vm_flags & VM_READ) 1263 else if (!write && vma->vm_flags & VM_MAYREAD)
1264 len -= copy_from_user(buf, (void *) addr, len); 1264 len -= copy_from_user(buf, (void *) addr, len);
1265 else 1265 else
1266 len = 0; 1266 len = 0;