diff options
-rw-r--r-- | mm/memory.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 3c530b639559..b9cc56a75f4b 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5944,7 +5944,7 @@ static int __access_remote_vm(struct mm_struct *mm, unsigned long addr, if (bytes > PAGE_SIZE-offset) bytes = PAGE_SIZE-offset; - maddr = kmap(page); + maddr = kmap_local_page(page); if (write) { copy_to_user_page(vma, page, addr, maddr + offset, buf, bytes); @@ -5953,8 +5953,7 @@ static int __access_remote_vm(struct mm_struct *mm, unsigned long addr, copy_from_user_page(vma, page, addr, buf, maddr + offset, bytes); } - kunmap(page); - put_page(page); + unmap_and_put_page(page, maddr); } len -= bytes; buf += bytes; |