From: Stanislav Kinsburskii <skinsburskii@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <lkp@intel.com>,
David Hildenbrand <david@kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
mm-commits@vger.kernel.org
Subject: Re: [akpm-mm:mm-new] BUILD SUCCESS WITH UNVERIFIED WARNING e0ffd277b09a7c9f1a436e5f75be37ac490bc59f
Date: Tue, 11 Aug 2026 16:50:15 -0700 [thread overview]
Message-ID: <anu1N-DOnQwxO1kF@skinsburskii> (raw)
In-Reply-To: <20260810132334.3cf85dc3e9061bc7072759f8@linux-foundation.org>
On Mon, Aug 10, 2026 at 01:23:34PM -0700, Andrew Morton wrote:
> On Mon, 10 Aug 2026 10:44:13 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> > branch HEAD: e0ffd277b09a7c9f1a436e5f75be37ac490bc59f mm/swap, PM: hibernate: atomically replace hibernation pin
> >
> > Unverified Warning (likely false positive, kindly check if interested):
> >
> > https://lore.kernel.org/oe-kbuild/202607120402.clBrrZQA-lkp@intel.com
> >
> > mm/hmm.c:673 hmm_do_fault() error: we previously assumed 'hmm_vma_walk->locked' could be null (see line 654)
> >
> > Warning ids grouped by kconfigs:
>
> Thanks. I assume this warning was produced by sparse? The report
> doesn't tell us this, and I suggest that it do so.
>
> > recent_errors
> > `-- s390-randconfig-r071-20260809
> > `-- mm-hmm.c-hmm_do_fault()-error:we-previously-assumed-hmm_vma_walk-locked-could-be-null-(see-line-)
>
> Caused by
>
> 121170831228 ("mm/hmm: add hmm_range_fault_unlocked_timeout() for mmap lock-drop support")
>
>
> Stanislaw, you've previously said that this is a can't-happen, but boy
> I'm getting tired of seeing this warning report. Would the below change
> hurt anything? I can't immediately think of a cost-free way of doing
> this.
>
I think this change doesn't do any harm.
Perhaps it worth a WARN_ON_ONCE to expose a wrong fault handler
behavior?
Thanks,
Stanislav
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: mm/hmm.c:hmm_do_fault(): suppress sparse warning
> Date: Mon Aug 10 01:16:37 PM PDT 2026
>
> mm/hmm.c:673 hmm_do_fault() error: we previously assumed 'hmm_vma_walk->locked' could be null (see line 654)
>
> Stanislav says this can't happen. Waste a few cycles to make the warning
> go away.
>
> Fixes: 121170831228 ("mm/hmm: add hmm_range_fault_unlocked_timeout() for mmap lock-drop support")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/202608101053.PhnVUM4u-lkp@intel.com
> Cc: Stanislav Kinsburskii <skinsburskii@gmail.com>
> Cc: David Hildenbrand <david@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> mm/hmm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/mm/hmm.c~mm-hmmc-hmm_do_fault-suppress-sparse-warning
> +++ a/mm/hmm.c
> @@ -670,7 +670,8 @@ static int hmm_do_fault(struct mm_struct
> ret = handle_mm_fault(vma, addr, fault_flags, NULL);
>
> if (ret & (VM_FAULT_COMPLETED | VM_FAULT_RETRY)) {
> - *hmm_vma_walk->locked = false;
> + if (hmm_vma_walk->locked) /* needed by sparse */
> + *hmm_vma_walk->locked = false;
> return HMM_FAULT_UNLOCKED;
> }
>
> _
>
next prev parent reply other threads:[~2026-08-11 23:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 2:44 [akpm-mm:mm-new] BUILD SUCCESS WITH UNVERIFIED WARNING e0ffd277b09a7c9f1a436e5f75be37ac490bc59f kernel test robot
2026-08-10 20:23 ` Andrew Morton
2026-08-11 23:50 ` Stanislav Kinsburskii [this message]
2026-08-12 0:27 ` Andrew Morton
2026-08-16 13:34 ` Stanislav Kinsburskii
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=anu1N-DOnQwxO1kF@skinsburskii \
--to=skinsburskii@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mm-commits@vger.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.