[PATCH 0/1] userfaultfd: don't pin the user memory in userfaultfd_file_create()

From: Oleg Nesterov
Date: Mon May 16 2016 - 11:25:29 EST


Hello,

Sorry for delay. So this is the same patch, just I added the helpers for get/put
mm->mm_users. I won't mind to change userfaultfd_get_mm() to return mm_struct-or-
NULL, or perhaps instead we should simply add the trivial helper which does
atomic_inc_not_zero(mm->mm_users) into sched.h, it can have more callers (fs/proc,
uprobes).

Testing. I have found selftests/vm/userfaultfd.c and it seems to work.

Oleg.