aboutsummaryrefslogtreecommitdiff
path: root/mm/mapping_dirty_helpers.c
diff options
context:
space:
mode:
authorGravatar Lokesh Gidra <lokeshgidra@google.com> 2024-04-04 10:17:26 -0700
committerGravatar Andrew Morton <akpm@linux-foundation.org> 2024-04-16 15:39:48 -0700
commitc0205eaf3af9f5db14d4b5ee4abacf4a583c3c50 (patch)
tree6bebb0c72f0b247bdab5804f46b5ed8d0980b9b2 /mm/mapping_dirty_helpers.c
parentmm/madvise: make MADV_POPULATE_(READ|WRITE) handle VM_FAULT_RETRY properly (diff)
downloadlinux-c0205eaf3af9f5db14d4b5ee4abacf4a583c3c50.tar.gz
linux-c0205eaf3af9f5db14d4b5ee4abacf4a583c3c50.tar.bz2
linux-c0205eaf3af9f5db14d4b5ee4abacf4a583c3c50.zip
userfaultfd: change src_folio after ensuring it's unpinned in UFFDIO_MOVE
Commit d7a08838ab74 ("mm: userfaultfd: fix unexpected change to src_folio when UFFDIO_MOVE fails") moved the src_folio->{mapping, index} changing to after clearing the page-table and ensuring that it's not pinned. This avoids failure of swapout+migration and possibly memory corruption. However, the commit missed fixing it in the huge-page case. Link: https://lkml.kernel.org/r/20240404171726.2302435-1-lokeshgidra@google.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Lokesh Gidra <lokeshgidra@google.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Kalesh Singh <kaleshsingh@google.com> Cc: Lokesh Gidra <lokeshgidra@google.com> Cc: Nicolas Geoffray <ngeoffray@google.com> Cc: Peter Xu <peterx@redhat.com> Cc: Qi Zheng <zhengqi.arch@bytedance.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mapping_dirty_helpers.c')
0 files changed, 0 insertions, 0 deletions