The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stepan Ionichev <sozdayvek@gmail.com>
To: david@kernel.org
Cc: akpm@linux-foundation.org, jgg@ziepe.ca, jhubbard@nvidia.com,
	peterx@redhat.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Stepan Ionichev <sozdayvek@gmail.com>
Subject: Re: [PATCH] mm/gup: tolerate NULL unlocked in fixup_user_fault()
Date: Fri,  8 May 2026 16:18:49 +0500	[thread overview]
Message-ID: <20260508111849.10379-1-sozdayvek@gmail.com> (raw)
In-Reply-To: <b1ec6c2a-b198-420c-9ab3-5ffad7f8b92b@kernel.org>

On Fri, 08 May 2026, David Hildenbrand wrote:
> That would be completely broken. We must not drop the mmap lock unless
> FAULT_FLAG_ALLOW_RETRY was set. Returning VM_FAULT_COMPLETED/VM_FAULT_RETRY
> would mean that we did that. Broken.
>
> And the function documents "If NULL, the caller must guarantee that fault_flags
> does not contain FAULT_FLAG_ALLOW_RETRY."

You're right -- the contract is already enforced by the surrounding
code and documented at the function. Defensive guards against an
impossible scenario would just hide future real bugs.

Please drop this patch.

Thanks for taking the time to explain.

Stepan

      reply	other threads:[~2026-05-08 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  8:30 [PATCH] mm/gup: tolerate NULL unlocked in fixup_user_fault() Stepan Ionichev
2026-05-08  8:33 ` David Hildenbrand (Arm)
2026-05-08 11:18   ` Stepan Ionichev [this message]

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=20260508111849.10379-1-sozdayvek@gmail.com \
    --to=sozdayvek@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox