Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36164
b: refs/heads/master
c: 0159b14
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Sep 27, 2006
1 parent bdbe7fd commit dcd9800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 5da6185bca064e35aa73a7c1f27488d2b96434f4
refs/heads/master: 0159b141d8b1f9b9f9cffacae47bec1e05c63b8b
11 changes: 3 additions & 8 deletions trunk/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ unsigned long do_mremap(unsigned long addr,

/*
* Look up the first VMA which satisfies addr < vm_end, NULL if none
* - should be called with mm->mmap_sem at least readlocked
*/
struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
{
Expand Down Expand Up @@ -1213,7 +1214,6 @@ struct page *filemap_nopage(struct vm_area_struct *area,
*/
int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write)
{
struct vm_list_struct *vml;
struct vm_area_struct *vma;
struct mm_struct *mm;

Expand All @@ -1227,13 +1227,8 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
down_read(&mm->mmap_sem);

/* the access must start within one of the target process's mappings */
for (vml = mm->context.vmlist; vml; vml = vml->next)
if (addr >= vml->vma->vm_start && addr < vml->vma->vm_end)
break;

if (vml) {
vma = vml->vma;

vma = find_vma(mm, addr);
if (vma) {
/* don't overrun this mapping */
if (addr + len >= vma->vm_end)
len = vma->vm_end - addr;
Expand Down

0 comments on commit dcd9800

Please sign in to comment.