Re: [PATCH v3 0/2] mm/memory: improve insert_pages() error handling

From: David Hildenbrand (Arm)

Date: Thu Sep 10 2026 - 06:21:19 EST


On 8/29/26 19:11, Avi Weiss wrote:
> Improve insert_pages() error handling.
>
> The first patch simplifies error handling by initializing the error
> status to zero and assigning error codes at their respective failure
> sites.
>
> The second patch returns -ENOMEM when walk_to_pmd() fails. A NULL
> return from walk_to_pmd() indicates failure to allocate an upper
> page-table level, so -ENOMEM is more appropriate than -EFAULT and is
> consistent with the subsequent pte_alloc() failure.
>
> Changes in v3:
>
> * drop the walk_to_pmd() rename following review
> * use the mm/memory: prefix consistently across the series
> * carry review tags from v2
> * rebase onto current mm-new

Double-checked, LGTM.
--
Cheers,

David