All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Foxie Flakey <foxieflakey@gmail.com>
Cc: Mike Rapoport <rppt@kernel.org>, Peter Xu <peterx@redhat.com>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] userfaultfd: reset err to be 0 when move_pages_ptes succeeded
Date: Tue, 18 Aug 2026 20:26:56 -0700	[thread overview]
Message-ID: <20260818202656.f7a248b33f6130d06b4cf83e@linux-foundation.org> (raw)
In-Reply-To: <e1e0b5f8-c3c6-0537-670b-4397f822f980@gmail.com>

On Wed, 19 Aug 2026 10:08:24 +0700 (WIB) Foxie Flakey <foxieflakey@gmail.com> wrote:

> 
> During move_pages() operation, when move_pages_ptes() returns EAGAIN,
> the error code is not cleared even after we processed it. This leads
> to a successful retry but then the same pages are retried again due to
> the stale error code. This time move fails because pages are already
> moved, loop is terminated and move_pages() reports a failure.
> Clear the error code once we processes EAGAIN.
> 
> Fixes: 50944692052b ("userfaultfd: opportunistic TLB-flush batching for present pages in MOVE")
> Assisted-by: ChatGPT:GPT-5.6-Luna
> Signed-off-by: Bryan Lim <foxieflakey@gmail.com>

Thanks, Bryan.

More paperwork: the signoff is supposed to match the Author:.  The way
to do this is to add an explicit From: line at start-of-changelog.  If
this is not present, we fall back to the email envelope's From:.

> --- a/mm/userfaultfd.c
> +++ b/mm/userfaultfd.c
> @@ -2085,8 +2085,10 @@ static ssize_t move_pages(struct userfaultfd_ctx *ctx, unsigned long dst_start,
>  		}
> 
>  		if (err) {
> -			if (err == -EAGAIN)
> +			if (err == -EAGAIN) {
> +				err = 0;
>  				continue;
> +			}
>  			break;
>  		}

I'll queue it, with an adjusted From:, as above.

Could reviewers please advise on whether we should backport this into
-stable kernels?



  reply	other threads:[~2026-08-19  3:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  3:08 [PATCH v3] userfaultfd: reset err to be 0 when move_pages_ptes succeeded Foxie Flakey
2026-08-19  3:26 ` Andrew Morton [this message]
2026-08-19  3:42   ` Foxie Flakey
2026-08-19  4:48   ` Suren Baghdasaryan
2026-08-19  6:46 ` Mike Rapoport

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=20260818202656.f7a248b33f6130d06b4cf83e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=foxieflakey@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    /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.