diff options
| author | Avi Weiss <thnkslprpt@gmail.com> | 2026-08-29 20:11:13 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:39:05 -0700 |
| commit | 3830ec6477e234a869731aa53bbb06ee2959346f (patch) | |
| tree | aa2ba52a790b894688bbda905bd0ea97d83d4d90 /include/linux | |
| parent | 1cb3621c6e9a13da36907e65a25bc7b1f11fcbc4 (diff) | |
mm/memory: return -ENOMEM for page-table allocation failure in insert_pages()
walk_to_pmd() returns NULL only when p4d_alloc(), pud_alloc(), or
pmd_alloc() fails. These are page-table allocation failures, but
insert_pages() currently reports them as -EFAULT.
Return -ENOMEM instead, consistent with the subsequent pte_alloc() failure
and with the single-page insert_page() path, which reports failure of the
same page-table allocation chain as -ENOMEM.
Address and range validation failures in vm_insert_pages() continue to
return -EFAULT. Keep the later -EFAULT return for pte_offset_map_lock(),
which is not an allocation failure.
Link: https://lore.kernel.org/9d990c3ed43608e674d4b12a8c221a09fd200f49.1788022178.git.thnkslprpt@gmail.com
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
