From: Mark Brown <broonie@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: Farhad Alemi <farhad.alemi@berkeley.edu>,
falemi@asu.edu, Radu Rendec <radu@rendec.net>,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] KASAN: slab-use-after-free Read in irq_migrate_all_off_this_cpu
Date: Sun, 30 Aug 2026 15:16:43 +0100 [thread overview]
Message-ID: <apQ7S5oUtlIyMvSG@sirena.org.uk> (raw)
In-Reply-To: <874igcdt2z.ffs@fw13>
[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]
On Sun, Aug 30, 2026 at 08:24:04AM +0200, Thomas Gleixner wrote:
> Though based on the meager information I think I roughly can see how
> that happens not only in the reported version. It's still the same
> problem upstream.
> Allocation happens at:
> regmap_add_irq_chip_fwnode+0x375/0x2dd0 drivers/base/regmap/regmap-irq.c:709
> d = kzalloc_obj(*d);
> That's initialized and then handed in as host_data when the interrupt
> domain is created.
Huh, due to the lack of information in the report that you noted I'd
thought this was misdirected due to -next or something...
> regmap_add_irq_chip_fwnode+0xd76/0x2dd0 drivers/base/regmap/regmap-irq.c:963
> Interestingly enough the code has a comment in that failure path:
> err_domain:
> /* Should really dispose of the domain but... */
> And it should dispose the domain properly which also would remove and
> free the interrupt descriptors.
...
> Mark, do you remember why you ended up with adding this comment instead
> of actualy mopping up the domain?
I believe that at the time there was no way of freeing irqdomains, or I
couldn't find it. irq_domain_remove() was added in May 2012 as a bit of
an afterthought in 58ee99ada293b (irqdomain: Support removal of IRQ
domains.), the above comment was added in the same month so won't have
been in the kernel I was working on. This was one of the first users
that wasn't arch code I think, having an interrupt controller that wasnt
arch code had a bunch of fun at that point in time. I do remember being
confused about why there wasn't a remove function and I imagine I meant
to go back and figure something out there but clearly never got round to
it, practically speaking the regmap-irq code was being used by things
like PMICs that would never actually get removed so this path was never
getting exercised.
I'll add the cleanup.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-08-30 14:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 5:41 Farhad Alemi
2026-08-29 20:34 ` Radu Rendec
2026-08-30 6:24 ` Thomas Gleixner
2026-08-30 14:16 ` Mark Brown [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=apQ7S5oUtlIyMvSG@sirena.org.uk \
--to=broonie@kernel.org \
--cc=falemi@asu.edu \
--cc=farhad.alemi@berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=radu@rendec.net \
--cc=tglx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®