]> git.baikalelectronics.ru Git - kernel.git/commit
userfaultfd: non-cooperative: notify about unmap of destination during mremap
authorMike Rapoport <rppt@linux.vnet.ibm.com>
Wed, 2 Aug 2017 20:31:55 +0000 (13:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Aug 2017 23:34:46 +0000 (16:34 -0700)
commit42ae7956afffe2279fbf48e0a8247772283f0094
tree2851b38cbb8e223d23a35b7150e5071edaeaabe1
parent19b342e1c041e909aa4c43b94c922388377c82e0
userfaultfd: non-cooperative: notify about unmap of destination during mremap

When mremap is called with MREMAP_FIXED it unmaps memory at the
destination address without notifying userfaultfd monitor.

If the destination were registered with userfaultfd, the monitor has no
way to distinguish between the old and new ranges and to properly relate
the page faults that would occur in the destination region.

Fixes: 0d8528fae74e ("userfaultfd: non-cooperative: add event for memory unmaps")
Link: http://lkml.kernel.org/r/1500276876-3350-1-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Pavel Emelyanov <xemul@virtuozzo.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mremap.c