The patch titled Subject: userfaultfd: use mmgrab instead of open-coded increment of mm_count has been added to the -mm tree. Its filename is userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> Subject: userfaultfd: use mmgrab instead of open-coded increment of mm_count Link: http://lkml.kernel.org/r/1508132478-7738-1-git-send-email-rppt@xxxxxxxxxxxxxxxxxx Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/userfaultfd.c~userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count fs/userfaultfd.c --- a/fs/userfaultfd.c~userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count +++ a/fs/userfaultfd.c @@ -668,7 +668,7 @@ int dup_userfaultfd(struct vm_area_struc ctx->features = octx->features; ctx->released = false; ctx->mm = vma->vm_mm; - atomic_inc(&ctx->mm->mm_count); + mmgrab(ctx->mm); userfaultfd_ctx_get(octx); fctx->orig = octx; _ Patches currently in -mm which might be from rppt@xxxxxxxxxxxxxxxxxx are userfaultfd-use-mmgrab-instead-of-open-coded-increment-of-mm_count.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html