Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178834
b: refs/heads/master
c: 7959722
h: refs/heads/master
v: v3
  • Loading branch information
Jie Zhang authored and Linus Torvalds committed Jan 7, 2010
1 parent 1c2abc8 commit b539b5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfe79c00a2f4f687eed8b7534d1d3d3d35540c29
refs/heads/master: 7959722b951cffcd61a0a35229d007deeed8c2dd
6 changes: 4 additions & 2 deletions trunk/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b539b5f

Please sign in to comment.