All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	linux-pci@vger.kernel.org, kbuild-all@01.org
Subject: Re: [pci:pci/resource 8/10] drivers/pci/of.c:332:3-8: WARNING: invalid free of devm_ allocated data
Date: Fri, 11 May 2018 17:27:51 -0500	[thread overview]
Message-ID: <20180511222750.GA211882@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <4720dc4c-9055-2616-c58b-d40895b9477c@siemens.com>

On Fri, May 11, 2018 at 07:53:21AM +0200, Jan Kiszka wrote:
> On 2018-05-11 07:45, Jan Kiszka wrote:
> > On 2018-05-11 07:08, Julia Lawall wrote:
> >> The devm_kzalloc on line 324 makes the kfrees on lines 332 and 355
> >> incorrect.  They can just be removed.
> > 
> > True. In fact, 358 and 359 should go as well - making them obsolete is
> > the whole point of this conversion.
> 
> More precisely, 332 needs to become devm_kfree because we skip over one
> resource without failing.
> 
> > 
> > The issue comes already with patch "Add dev parameter to
> > __of_pci_get_host_bridge_resources()" when dev != NULL. Bjorn, should I
> > resend the series with that patch fixed and the rest rebased? Or do you
> > prefer when I update only this patch, fixing the issue here?
> 
> ...or is a fixup patch on top preferred?

Sorry, I missed this until now.  If you send me a fixup patch on top of my
pci/resource branch, I'll just fold it in.

  reply	other threads:[~2018-05-11 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11  5:08 [pci:pci/resource 8/10] drivers/pci/of.c:332:3-8: WARNING: invalid free of devm_ allocated data Julia Lawall
2018-05-11  5:45 ` Jan Kiszka
2018-05-11  5:53   ` Jan Kiszka
2018-05-11 22:27     ` Bjorn Helgaas [this message]
2018-05-13 18:22       ` [PATCH] PCI: Fix error cleanup paths in devm_of_pci_get_host_bridge_resources() Jan Kiszka

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=20180511222750.GA211882@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kbuild-all@01.org \
    --cc=linux-pci@vger.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 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.