On Wed, Feb 26, 2025 at 10:55:09AM -0800, Suren Baghdasaryan wrote:
Current implementation of move_pages_pte() copies source and destination PTEs in order to detect concurrent changes to PTEs involved in the move. However these copies are also used to unmap the PTEs, which will fail if CONFIG_HIGHPTE is enabled because the copies are allocated on the stack. Fix this by using the actual PTEs which were kmap()ed.
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Reported-by: Peter Xu peterx@redhat.com Signed-off-by: Suren Baghdasaryan surenb@google.com Cc: stable@vger.kernel.org
Reviewed-by: Peter Xu peterx@redhat.com