diff options
author | Mike Rapoport <[email protected]> | 2017-02-22 15:42:30 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-02-22 16:41:28 -0800 |
commit | d3aadc8ed4cb447981ecf34f9af71cddc6cf907d (patch) | |
tree | 1833efa2cd4ec49c81e3a35ca3e046c48c1a549f | |
parent | 893e26e61d04eac974ded0c11e1647b335c8cb7b (diff) |
userfaultfd: non-cooperative: dup_userfaultfd: use mm_count instead of mm_users
Since commit d2005e3f41d4 ("userfaultfd: don't pin the user memory in
userfaultfd_file_create()") userfaultfd uses mm_count rather than
mm_users to pin mm_struct.
Make dup_userfaultfd consistent with this behaviour
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Andrea Arcangeli <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Michael Rapoport <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/userfaultfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 6046e0b552b2..27978f249016 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -558,7 +558,7 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs) ctx->features = octx->features; ctx->released = false; ctx->mm = vma->vm_mm; - atomic_inc(&ctx->mm->mm_users); + atomic_inc(&ctx->mm->mm_count); userfaultfd_ctx_get(octx); fctx->orig = octx; |