summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/nommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 2e140a6..829fc90 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
len = vma->vm_end - addr;
/* only read or write mappings where it is permitted */
- if (write && vma->vm_flags & VM_WRITE)
+ if (write && vma->vm_flags & VM_MAYWRITE)
len -= copy_to_user((void *) addr, buf, len);
- else if (!write && vma->vm_flags & VM_READ)
+ else if (!write && vma->vm_flags & VM_MAYREAD)
len -= copy_from_user(buf, (void *) addr, len);
else
len = 0;