diff options
author | 2017-05-02 11:02:41 +0200 | |
---|---|---|
committer | 2017-05-02 11:02:41 +0200 | |
commit | 4d6ca227c768b50b05cf183974b40abe444e9d0c (patch) | |
tree | bf953d8e895281053548b9967a2c4b58d641df00 /mm/util.c | |
parent | Merge branch 'for-4.12/sony' into for-linus (diff) | |
parent | HID: asus: support backlight on USB keyboards (diff) | |
download | wireguard-linux-4d6ca227c768b50b05cf183974b40abe444e9d0c.tar.xz wireguard-linux-4d6ca227c768b50b05cf183974b40abe444e9d0c.zip |
Merge branch 'for-4.12/asus' into for-linus
Diffstat (limited to '')
-rw-r--r-- | mm/util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/util.c b/mm/util.c index 3cb2164f4099..656dc5e37a87 100644 --- a/mm/util.c +++ b/mm/util.c @@ -5,12 +5,15 @@ #include <linux/export.h> #include <linux/err.h> #include <linux/sched.h> +#include <linux/sched/mm.h> +#include <linux/sched/task_stack.h> #include <linux/security.h> #include <linux/swap.h> #include <linux/swapops.h> #include <linux/mman.h> #include <linux/hugetlb.h> #include <linux/vmalloc.h> +#include <linux/userfaultfd_k.h> #include <asm/sections.h> #include <linux/uaccess.h> @@ -297,14 +300,16 @@ unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, unsigned long ret; struct mm_struct *mm = current->mm; unsigned long populate; + LIST_HEAD(uf); ret = security_mmap_file(file, prot, flag); if (!ret) { if (down_write_killable(&mm->mmap_sem)) return -EINTR; ret = do_mmap_pgoff(file, addr, len, prot, flag, pgoff, - &populate); + &populate, &uf); up_write(&mm->mmap_sem); + userfaultfd_unmap_complete(mm, &uf); if (populate) mm_populate(ret, populate); } |