]> www.infradead.org Git - users/hch/misc.git/commit
mm: don't skip arch_sync_kernel_mappings() in error paths
authorRyan Roberts <ryan.roberts@arm.com>
Wed, 26 Feb 2025 12:16:09 +0000 (12:16 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Mar 2025 05:36:18 +0000 (21:36 -0800)
commit3685024edd270f7c791f993157d65d3c928f3d6e
tree0a9f2f2f2895176e4aa516c57df03e1e901b7a82
parentadae46ac1e38a288b14f0298e27412adcba83f8e
mm: don't skip arch_sync_kernel_mappings() in error paths

Fix callers that previously skipped calling arch_sync_kernel_mappings() if
an error occurred during a pgtable update.  The call is still required to
sync any pgtable updates that may have occurred prior to hitting the error
condition.

These are theoretical bugs discovered during code review.

Link: https://lkml.kernel.org/r/20250226121610.2401743-1-ryan.roberts@arm.com
Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified")
Fixes: 0c95cba49255 ("mm: apply_to_pte_range warn and fail if a large pte is encountered")
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christop Hellwig <hch@infradead.org>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c
mm/vmalloc.c