mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm/memory: improve insert_pages() error handling
@ 2026-08-29 17:11 Avi Weiss
  2026-08-29 17:11 ` [PATCH v3 1/2] mm/memory: simplify error handling in insert_pages() Avi Weiss
  2026-08-29 17:11 ` [PATCH v3 2/2] mm/memory: return -ENOMEM for page-table allocation failure " Avi Weiss
  0 siblings, 2 replies; 3+ messages in thread
From: Avi Weiss @ 2026-08-29 17:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Lorenzo Stoakes, Liam R . Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
	linux-mm, linux-kernel, Avi Weiss

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

Link: https://lore.kernel.org/r/cover.1785847364.git.thnkslprpt@gmail.com/

Avi Weiss (2):
  mm/memory: simplify error handling in insert_pages()
  mm/memory: return -ENOMEM for page-table allocation failure in
    insert_pages()

 mm/memory.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)


base-commit: d2aad7fdcda7ae8a726926f2d6de7fe9e8ee7563
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-29 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-29 17:11 [PATCH v3 0/2] mm/memory: improve insert_pages() error handling Avi Weiss
2026-08-29 17:11 ` [PATCH v3 1/2] mm/memory: simplify error handling in insert_pages() Avi Weiss
2026-08-29 17:11 ` [PATCH v3 2/2] mm/memory: return -ENOMEM for page-table allocation failure " Avi Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®