userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage
authorMike Rapoport <[email protected]>
Thu, 10 Aug 2017 22:24:32 +0000 (15:24 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 Aug 2017 22:54:07 +0000 (15:54 -0700)
commite86b298bebf7e799e4b7232e9135799f1947552e
treeef1d29b5737ebbe5bdcf966bcd69a152e634a0b8
parentf357e345eef7863da037e0243f2d3df4ba6df986
userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage

When the process exit races with outstanding mcopy_atomic, it would be
better to return ESRCH error.  When such race occurs the process and
it's mm are going away and returning "no such process" to the uffd
monitor seems better fit than ENOSPC.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
Suggested-by: Michal Hocko <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/userfaultfd.c