Re: [PATCH] userfaultfd: mcopy_atomic: update cases returning -ENOENT
From: Andrea Arcangeli
Date: Tue Feb 07 2017 - 15:07:01 EST
On Tue, Feb 07, 2017 at 05:02:50PM +0200, Mike Rapoport wrote:
> Hello Andrew,
>
> The patch below is an incremental fixup for concerns Andrea raised at [1].
> Please let me know if you prefer me to update the original patch and
> resend.
>
> [1] http://www.spinics.net/lists/linux-mm/msg121267.html
>
> --
> Sincerely yours,
> Mike.
>
> From 8acff65ecee8ca4cc892d35b45125c34568d1c93 Mon Sep 17 00:00:00 2001
> From: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
> Date: Tue, 7 Feb 2017 11:50:17 +0200
> Subject: [PATCH] userfaultfd: mcopy_atomic: update cases returning -ENOENT
>
> As Andrea commented in [1], if the VMA covering the address was unmapped,
> we may end up with a VMA a way above the faulting address. In this case we
> would like to return -ENOENT to allow uffd monitor detection of VMA
> removal.
>
> [1] http://www.spinics.net/lists/linux-mm/msg121267.html
>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>