]> Git Repo - linux.git/commit
userfaultfd: shmem: __do_fault requires VM_FAULT_NOPAGE
authorAndrea Arcangeli <[email protected]>
Fri, 10 Mar 2017 00:16:28 +0000 (16:16 -0800)
committerLinus Torvalds <[email protected]>
Fri, 10 Mar 2017 01:01:09 +0000 (17:01 -0800)
commit6bbc4a4144b1a69743022ac68dfaf6e7d993abb9
tree6a9eaa82d3bb88a8de32ee18320559491fea8780
parentea6200e84182989a3cce9687cf79a23ac44ec4db
userfaultfd: shmem: __do_fault requires VM_FAULT_NOPAGE

__do_fault assumes vmf->page has been initialized and is valid if
VM_FAULT_NOPAGE is not returned by vma->vm_ops->fault(vma, vmf).

handle_userfault() in turn should return VM_FAULT_NOPAGE if it doesn't
return VM_FAULT_SIGBUS or VM_FAULT_RETRY (the other two possibilities).

This VM_FAULT_NOPAGE case is only invoked when signal are pending and it
didn't matter for anonymous memory before.  It only started to matter
since shmem was introduced.  hugetlbfs also takes a different path and
doesn't exercise __do_fault.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andrea Arcangeli <[email protected]>
Reported-by: Dmitry Vyukov <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/userfaultfd.c
This page took 0.043865 seconds and 4 git commands to generate.