From: Matthew Wilcox <willy@infradead.org>
To: Shivank Garg <shivagar@amd.com>
Cc: Calvin Owens <calvin@wbinvd.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: Re: [BUG next-20260105] khugepaged: kernel BUG at ./include/linux/xarray.h:1441
Date: Mon, 5 Jan 2026 21:02:20 +0000 [thread overview]
Message-ID: <aVwm3MQ_ZDa_kU8c@casper.infradead.org> (raw)
In-Reply-To: <d1cdf40c-9535-4d79-abaa-aa1675ec62f2@amd.com>
On Tue, Jan 06, 2026 at 01:24:03AM +0530, Shivank Garg wrote:
> I'm able to reproduce this issue locally.
> I tested with xas_reset() before taking lock and this fixed the issue.
Yes, that's one of the options I'm considering.
But we don't actually use the xa_state between the point where we call
xas_lock_irq() and where we call xas_set() at the start of the loop.
So we could switch to xa_lock_irq(xas.xa) here instead and save assigning
to xas.xa_node twice.
But this is a long and complicated function (over 400 lines!) and I don't
know if fixing this one way or the other would serve to make other bugs
more likely or expose some future problem to the debugging code.
This isn't the kind of thing where you can just jump in with a one line
patch and actually be helpful, sorry.
prev parent reply other threads:[~2026-01-05 21:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 17:24 Calvin Owens
2026-01-05 17:51 ` Andrew Morton
2026-01-05 18:10 ` Calvin Owens
2026-01-05 18:31 ` Matthew Wilcox
2026-01-05 18:24 ` Matthew Wilcox
2026-01-05 18:48 ` Calvin Owens
2026-01-05 19:22 ` Matthew Wilcox
2026-01-05 19:54 ` Shivank Garg
2026-01-05 21:02 ` Matthew Wilcox [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=aVwm3MQ_ZDa_kU8c@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=calvin@wbinvd.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=shivagar@amd.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