Skip to content

mm/memory: improve insert_pages() error handling

Avi Weiss linux-mm lkml 2 versions – Applied

Status from this message: [merged mm-stable] mm-memory-return-enomem-for-page-table-allocation-failure-in-insert_pages.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied 2/2
  2. v23 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* 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

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm/memory: simplify error handling in insert_pages()mm/memory.c+11 -111 replyApplied
2/2mm/memory: return -ENOMEM for page-table allocation failure in insert_pages()mm/memory.c+1 -10 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid Hildenbrand (Arm)Lorenzo Stoakes (ARM)
1/2A-b R-b
2/2A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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

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

Signature · 1 line
2.43.0