Re: [akpm-mm:mm-new] BUILD SUCCESS WITH UNVERIFIED WARNING e0ffd277b09a7c9f1a436e5f75be37ac490bc59f

Stanislav Kinsburskii <[email protected]>
Newsgroups org.kernel.vger.mm-commits,org.kvack.linux-mm
Message-ID <aoG8aLLa2l_G1GRX@skinsburskii>
On Tue, Aug 11, 2026 at 05:27:13PM -0700, Andrew Morton wrote:
> On Tue, 11 Aug 2026 16:50:15 -0700 Stanislav Kinsburskii <[email protected]> wrote:
> 
> > > 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?
> 
> Like this?
> 
> 		if (ret & (VM_FAULT_COMPLETED | VM_FAULT_RETRY)) {
> 			if (hmm_vma_walk->locked)    /* needed by sparse */
> 				*hmm_vma_walk->locked = false;
> 			else
> 				WARN_ON_ONCE(1);    /* broken fault handler */
> 			return HMM_FAULT_UNLOCKED;
> 		}
> 

Yes, or even like this:

 		if (ret & (VM_FAULT_COMPLETED | VM_FAULT_RETRY)) {
 			if (WARN_ON_ONCE(hmm_vma_walk->locked))    /* needed by sparse */
 				*hmm_vma_walk->locked = false;
 			return HMM_FAULT_UNLOCKED;
 		}
 

Thanks,
Stanislav
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.