public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Lance Yang <lance.yang@linux.dev>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
	"Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
Cc: syzbot <syzbot+8961cb270ae74b4129fb@syzkaller.appspotmail.com>,
	willy@infradead.org, baolin.wang@linux.alibaba.com,
	npache@redhat.com, linux-mm@kvack.org, baohua@kernel.org,
	ryan.roberts@arm.com, syzkaller-bugs@googlegroups.com,
	dev.jain@arm.com, ziy@nvidia.com, linux-kernel@vger.kernel.org,
	Liam.Howlett@oracle.com, akpm@linux-foundation.org
Subject: Re: [syzbot] [mm?] kernel BUG in collapse_scan_file
Date: Thu, 19 Mar 2026 17:14:06 +0800	[thread overview]
Message-ID: <b963c391-8576-4351-b121-67ab9a9b2a1e@linux.dev> (raw)
In-Reply-To: <c3defcfd-74f6-4e70-b002-85bdcba44df9@kernel.org>



On 2026/3/19 17:00, David Hildenbrand (Arm) wrote:
> On 3/19/26 09:53, Lorenzo Stoakes (Oracle) wrote:
>> On Thu, Mar 19, 2026 at 04:05:38PM +0800, Lance Yang wrote:
>>> Ccing Willy
>>>
>>> IIUC, this is a dup of the earlier report[1], which I looked into back
>>> in January. The root cause is the same: collapse_file() calls
>>> xas_lock_irq() without resetting the xas state first, tripping the
>>> XAS_INVALID() assertion:
>>>
>>> #define xas_lock_irq(xas)	xa_lock_irq(XAS_INVALID(xas)->xa)
>>>
>>> static inline struct xa_state *XAS_INVALID(struct xa_state *xas)
>>> {
>>> 	XA_NODE_BUG_ON(xas->xa_node, xas_valid(xas));
>>> 	return xas;
>>> }
>>>
>>> Added by commit:
>>>
>>> commit 43b00759f21b10142094d1ae5ff65cbb368953a3
>>> Author: Matthew Wilcox (Oracle) <willy@infradead.org>
>>> Date:   Sun Dec 14 10:53:31 2025 -0500
>>>
>>>      XArray: Add extra debugging check to xas_lock and friends
>>>
>>>      While tracking down a recent bug, we discovered somewhere that had
>>>      forgotten to call xas_reset() before calling xas_lock().  Add a debug
>>>      check to be sure that doesn't happen in future and fix all the places in
>>>      the test suite which were carelessly doing just this.
>>>
>>>      Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
>>>      Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
>>>
>>> I posted a HACK fix at the time[2], but David pointed out that Willy
>>> had mentioned it likely needs more thought[3].
>>
>> Hmm we shouldn't leave this bug in place while working for a fancier fix??
>>
>> Can we get _something_ going as an upstream fix? We can improve whatever we do
>> later right?
>>
>> David, thoughts?
> 
> I recall Willy mentioning that the issue is likely a false positive.
> 
> IIUC, that commit is not upstream? So it only triggers in linux-next.

Right. That does not appear to be in upstream, I only see it in 
linux-next :)

> Which means:
> 
> 1) If it's a false positive, upstream is not effected (no XA_NODE_BUG_ON)
> 
> 2) If it's not a false positive, upstream is effected but does not
> trigger the XA_NODE_BUG_ON

Yep. So this particular BUG_ON is not affecting upstream directly.

That said, syzbot will likely keep hitting it in linux-next and
generating noise for us until it is addressed there ...


  reply	other threads:[~2026-03-19  9:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  7:20 [syzbot] [mm?] kernel BUG in collapse_scan_file syzbot
2026-03-19  7:22 ` David Hildenbrand (Arm)
2026-03-19  8:05 ` Lance Yang
2026-03-19  8:53   ` Lorenzo Stoakes (Oracle)
2026-03-19  9:00     ` David Hildenbrand (Arm)
2026-03-19  9:14       ` Lance Yang [this message]
2026-03-19  9:21         ` David Hildenbrand (Arm)
2026-03-19 10:27           ` Lorenzo Stoakes (Oracle)
2026-03-19 10:59             ` David Hildenbrand (Arm)
2026-03-19 11:07               ` Lorenzo Stoakes (Oracle)
2026-03-19 11:10                 ` David Hildenbrand (Arm)
2026-03-19 11:12                   ` Lorenzo Stoakes (Oracle)
2026-03-19 10:56   ` Vlastimil Babka
2026-03-19 11:04     ` Lorenzo Stoakes (Oracle)
2026-03-19 12:17     ` Mark Brown
2026-03-20 12:39       ` Mark Brown
2026-03-20 13:17 ` Lorenzo Stoakes (Oracle)

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=b963c391-8576-4351-b121-67ab9a9b2a1e@linux.dev \
    --to=lance.yang@linux.dev \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=npache@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=syzbot+8961cb270ae74b4129fb@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.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