* [PATCH] userfaultfd: use mmgrab instead of open-coded increment of mm_count
@ 2017-10-16 5:41 Mike Rapoport
0 siblings, 0 replies; only message in thread
From: Mike Rapoport @ 2017-10-16 5:41 UTC (permalink / raw)
To: Andrew Morton
Cc: Andrea Arcangeli, Dr . David Alan Gilbert, Mike Kravetz, linux-mm,
Mike Rapoport
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
fs/userfaultfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index ef4b48d1ea42..876b670f602e 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -662,7 +662,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_count);
+ mmgrab(ctx->mm);
userfaultfd_ctx_get(octx);
fctx->orig = octx;
--
2.7.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-16 5:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-16 5:41 [PATCH] userfaultfd: use mmgrab instead of open-coded increment of mm_count Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).