aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index f7886ab036e7..99275325f303 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3462,7 +3462,7 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
3462 if (follow_phys(vma, addr, write, &prot, &phys_addr)) 3462 if (follow_phys(vma, addr, write, &prot, &phys_addr))
3463 return -EINVAL; 3463 return -EINVAL;
3464 3464
3465 maddr = ioremap_prot(phys_addr, PAGE_SIZE, prot); 3465 maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot);
3466 if (write) 3466 if (write)
3467 memcpy_toio(maddr + offset, buf, len); 3467 memcpy_toio(maddr + offset, buf, len);
3468 else 3468 else