From: Simon Horman <horms@verge.net.au>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] PCI: rcar: Fix use-after-free in probe error path
Date: Wed, 13 Dec 2017 09:29:34 +0100 [thread overview]
Message-ID: <20171213082933.dpswh3x234bu4dhu@verge.net.au> (raw)
In-Reply-To: <20171212192942.GE53955@bhelgaas-glaptop.roam.corp.google.com>
On Tue, Dec 12, 2017 at 01:29:42PM -0600, Bjorn Helgaas wrote:
> On Thu, Dec 07, 2017 at 11:15:19AM +0100, Geert Uytterhoeven wrote:
> > If CONFIG_DEBUG_SLAB=y, and no PCIe card is inserted, the kernel crashes
> > during probe on r8a7791/koelsch:
> >
> > rcar-pcie fe000000.pcie: PCIe link down
> > Unable to handle kernel paging request at virtual address 6b6b6b6b
> >
> > (seeing this message requires earlycon and keep_bootcon).
> >
> > Indeed, pci_free_host_bridge() frees the PCI host bridge, including the
> > embedded rcar_pcie object, so pci_free_resource_list() must not be
> > called afterwards.
> >
> > To fix this, move the call to pci_free_resource_list() up, and update the
> > label name accordingly.
> >
> > Fixes: ddd535f1ea3eb27e ("PCI: rcar: Fix memory leak when no PCIe card is inserted")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Applied with Simon's and Lorenzo's acks to for-linus for v4.15, thanks!
>
> I'll leave the second patch up to Lorenzo for v4.16, since it doesn't seem
> as critical.
Thanks Bjorn, that's fine by me.
next prev parent reply other threads:[~2017-12-13 8:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 10:15 [PATCH 0/2] PCI: rcar: Misc error path fixes Geert Uytterhoeven
2017-12-07 10:15 ` [PATCH 1/2] PCI: rcar: Fix use-after-free in probe error path Geert Uytterhoeven
2017-12-08 10:24 ` Lorenzo Pieralisi
2017-12-12 19:29 ` Bjorn Helgaas
2017-12-13 8:29 ` Simon Horman [this message]
2017-12-07 10:15 ` [PATCH 2/2] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures Geert Uytterhoeven
2017-12-08 10:30 ` Lorenzo Pieralisi
2017-12-19 11:40 ` Lorenzo Pieralisi
2017-12-07 10:29 ` [PATCH 0/2] PCI: rcar: Misc error path fixes Simon Horman
2017-12-12 17:16 ` Bjorn Helgaas
2017-12-12 18:07 ` Geert Uytterhoeven
2017-12-12 18:10 ` Lorenzo Pieralisi
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=20171213082933.dpswh3x234bu4dhu@verge.net.au \
--to=horms@verge.net.au \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=harunobu.kurokawa.dn@renesas.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=phil.edworthy@renesas.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
all inboxes | Powered by JetHome®