All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Weiss <thnkslprpt@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R . Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH v3 0/2] mm/memory: improve insert_pages() error handling
Date: Sat, 29 Aug 2026 20:11:11 +0300	[thread overview]
Message-ID: <cover.1788022178.git.thnkslprpt@gmail.com> (raw)

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



             reply	other threads:[~2026-08-29 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 17:11 Avi Weiss [this message]
2026-08-29 17:11 ` [PATCH v3 1/2] mm/memory: simplify error handling in insert_pages() Avi Weiss
2026-09-10 15:33   ` Lorenzo Stoakes (ARM)
2026-08-29 17:11 ` [PATCH v3 2/2] mm/memory: return -ENOMEM for page-table allocation failure " Avi Weiss
2026-09-10 10:06 ` [PATCH v3 0/2] mm/memory: improve insert_pages() error handling David Hildenbrand (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1788022178.git.thnkslprpt@gmail.com \
    --to=thnkslprpt@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.