projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
[firefly-linux-kernel-4.4.55.git]
/
fs
/
userfaultfd.c
diff --git
a/fs/userfaultfd.c
b/fs/userfaultfd.c
index 50311703135bc8c699bcc3d26d0b9aa24b5277f3..d473e6e07a7e66a05860347b578e0854c92e1805 100644
(file)
--- a/
fs/userfaultfd.c
+++ b/
fs/userfaultfd.c
@@
-286,6
+286,12
@@
int handle_userfault(struct vm_area_struct *vma, unsigned long address,
if (unlikely(ACCESS_ONCE(ctx->released)))
goto out;
if (unlikely(ACCESS_ONCE(ctx->released)))
goto out;
+ /*
+ * We don't do userfault handling for the final child pid update.
+ */
+ if (current->flags & PF_EXITING)
+ goto out;
+
/*
* Check that we can return VM_FAULT_RETRY.
*
/*
* Check that we can return VM_FAULT_RETRY.
*
@@
-451,7
+457,8
@@
static int userfaultfd_release(struct inode *inode, struct file *file)
new_flags, vma->anon_vma,
vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
new_flags, vma->anon_vma,
vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
- NULL_VM_UFFD_CTX);
+ NULL_VM_UFFD_CTX,
+ vma_get_anon_name(vma));
if (prev)
vma = prev;
else
if (prev)
vma = prev;
else
@@
-827,7
+834,8
@@
static int userfaultfd_register(struct userfaultfd_ctx *ctx,
prev = vma_merge(mm, prev, start, vma_end, new_flags,
vma->anon_vma, vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
prev = vma_merge(mm, prev, start, vma_end, new_flags,
vma->anon_vma, vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
- ((struct vm_userfaultfd_ctx){ ctx }));
+ ((struct vm_userfaultfd_ctx){ ctx }),
+ vma_get_anon_name(vma));
if (prev) {
vma = prev;
goto next;
if (prev) {
vma = prev;
goto next;
@@
-961,7
+969,8
@@
static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
prev = vma_merge(mm, prev, start, vma_end, new_flags,
vma->anon_vma, vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
prev = vma_merge(mm, prev, start, vma_end, new_flags,
vma->anon_vma, vma->vm_file, vma->vm_pgoff,
vma_policy(vma),
- NULL_VM_UFFD_CTX);
+ NULL_VM_UFFD_CTX,
+ vma_get_anon_name(vma));
if (prev) {
vma = prev;
goto next;
if (prev) {
vma = prev;
goto next;