From: Marc Zyngier <maz@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jon Derrick <jonathan.derrick@intel.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-pci@vger.kernel.org,
Sushma Kalakota <sushmax.kalakota@intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] irqdomain/treewide: Keep firmware node unconditionally allocated
Date: Thu, 09 Jul 2020 13:00:59 +0100 [thread overview]
Message-ID: <b90acf9f348f2eb7b7244913c130cbff@kernel.org> (raw)
In-Reply-To: <873661qakd.fsf@nanos.tec.linutronix.de>
Hi Thomas,
Catching up on email...
On 2020-07-09 10:53, Thomas Gleixner wrote:
> Quite some non OF/ACPI users of irqdomains allocate firmware nodes of
> type
> IRQCHIP_FWNODE_NAMED or IRQCHIP_FWNODE_NAMED_ID and free them right
> after
> creating the irqdomain. The only purpose of these FW nodes is to convey
> name information. When this was introduced the core code did not store
> the
> pointer to the node in the irqdomain. A recent change stored the
> firmware
> node pointer in irqdomain for other reasons and missed to notice that
> the
> usage sites which do the alloc_fwnode/create_domain/free_fwnode
> sequence
> are broken by this. Storing a dangling pointer is dangerous itself, but
> in
> case that the domain is destroyed later on this leads to a double free.
>
> Remove the freeing of the firmware node after creating the irqdomain
> from
> all affected call sites to cure this.
>
> Fixes: 711419e504eb ("irqdomain: Add the missing assignment of
> domain->fwnode for named fwnode")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: stable@vger.kernel.org
Urgh, that's pretty disastrous. My bad. Thanks a lot for having
put this patch together.
Acked-by: Marc Zyngier <maz@kernel.org>
If you can take it directly into Linus' tree, that'd be greatly
appreciated.
Thanks again,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2020-07-09 12:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 16:24 [PATCH] PCI: vmd: Keep fwnode allocated through VMD irqdomain life Jon Derrick
2020-06-25 16:24 ` Jon Derrick
2020-06-25 19:58 ` Bjorn Helgaas
2020-06-25 20:21 ` Derrick, Jonathan
2020-06-29 23:20 ` Bjorn Helgaas
2020-06-30 9:39 ` Andy Shevchenko
2020-06-30 16:33 ` Bjorn Helgaas
2020-07-04 1:44 ` Derrick, Jonathan
2020-07-04 12:04 ` andriy.shevchenko
2020-07-14 15:40 ` Thomas Gleixner
2020-07-14 15:43 ` Derrick, Jonathan
2020-07-06 10:47 ` Thomas Gleixner
2020-07-06 11:18 ` Andy Shevchenko
2020-07-06 13:30 ` Thomas Gleixner
2020-07-06 15:44 ` Bjorn Helgaas
2020-07-09 9:53 ` [PATCH] irqdomain/treewide: Keep firmware node unconditionally allocated Thomas Gleixner
2020-07-09 12:00 ` Marc Zyngier [this message]
2020-07-09 21:47 ` Bjorn Helgaas
2020-07-14 15:48 ` [tip: irq/urgent] " tip-bot2 for Thomas Gleixner
2020-07-16 0:27 ` [PATCH] " Sasha Levin
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=b90acf9f348f2eb7b7244913c130cbff@kernel.org \
--to=maz@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=helgaas@kernel.org \
--cc=jonathan.derrick@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=sushmax.kalakota@intel.com \
--cc=tglx@linutronix.de \
/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.