]> 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)
commite3884d8899564f27e8dc1c998d611be77940d09b
tree2851b38cbb8e223d23a35b7150e5071edaeaabe1
parent6f916d942956bb2711ac08fcb75b3a4efbe05dff
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: e26ec1fcf122 ("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