]> www.infradead.org Git - users/jedix/linux-maple.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>
Tue, 4 Mar 2025 05:48:32 +0000 (21:48 -0800)
commitcf189c3eec014e044e50e0dfc2ee673fb703fe8c
treefd551b5105aef6484e953a082e695f81fac2e46a
parentfcc1895522563e4bb5c70313b030e889541f3f44
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