diff options
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 5596d77e8656..5c55270729f7 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -3613,11 +3613,13 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, | |||
3613 | ret = get_user_pages(tsk, mm, addr, 1, | 3613 | ret = get_user_pages(tsk, mm, addr, 1, |
3614 | write, 1, &page, &vma); | 3614 | write, 1, &page, &vma); |
3615 | if (ret <= 0) { | 3615 | if (ret <= 0) { |
3616 | #ifndef CONFIG_HAVE_IOREMAP_PROT | ||
3617 | break; | ||
3618 | #else | ||
3616 | /* | 3619 | /* |
3617 | * Check if this is a VM_IO | VM_PFNMAP VMA, which | 3620 | * Check if this is a VM_IO | VM_PFNMAP VMA, which |
3618 | * we can access using slightly different code. | 3621 | * we can access using slightly different code. |
3619 | */ | 3622 | */ |
3620 | #ifdef CONFIG_HAVE_IOREMAP_PROT | ||
3621 | vma = find_vma(mm, addr); | 3623 | vma = find_vma(mm, addr); |
3622 | if (!vma || vma->vm_start > addr) | 3624 | if (!vma || vma->vm_start > addr) |
3623 | break; | 3625 | break; |
@@ -3625,9 +3627,9 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, | |||
3625 | ret = vma->vm_ops->access(vma, addr, buf, | 3627 | ret = vma->vm_ops->access(vma, addr, buf, |
3626 | len, write); | 3628 | len, write); |
3627 | if (ret <= 0) | 3629 | if (ret <= 0) |
3628 | #endif | ||
3629 | break; | 3630 | break; |
3630 | bytes = ret; | 3631 | bytes = ret; |
3632 | #endif | ||
3631 | } else { | 3633 | } else { |
3632 | bytes = len; | 3634 | bytes = len; |
3633 | offset = addr & (PAGE_SIZE-1); | 3635 | offset = addr & (PAGE_SIZE-1); |