From: Bjorn Helgaas <helgaas@kernel.org>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
Kalle Valo <kvalo@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] PCI: Free released resource
Date: Wed, 6 Sep 2023 15:04:34 -0500 [thread overview]
Message-ID: <20230906200434.GA231687@bhelgaas> (raw)
In-Reply-To: <20230906110846.225369-1-ross.lagerwall@citrix.com>
On Wed, Sep 06, 2023 at 12:08:46PM +0100, Ross Lagerwall wrote:
> release_resource() doesn't actually free the resource or resource list
> entry so free the resource list entry to avoid a leak.
>
> Fixes: e54223275ba1 ("PCI: Release resource invalidated by coalescing")
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> Reported-by: Kalle Valo <kvalo@kernel.org>
> Closes: https://lore.kernel.org/r/878r9sga1t.fsf@kernel.org/
> Tested-by: Kalle Valo <kvalo@kernel.org>
> Cc: stable@vger.kernel.org # v5.16+
Applied to for-linus for v6.6-rc1.
> ---
> drivers/pci/probe.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index ab2a4a3a4c06..795534589b98 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -997,6 +997,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
> res = window->res;
> if (!res->flags && !res->start && !res->end) {
> release_resource(res);
> + resource_list_destroy_entry(window);
> continue;
> }
>
> --
> 2.41.0
>
prev parent reply other threads:[~2023-09-06 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 11:08 [PATCH] PCI: Free released resource Ross Lagerwall
2023-09-06 20:04 ` Bjorn Helgaas [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=20230906200434.GA231687@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=kvalo@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ross.lagerwall@citrix.com \
--cc=stable@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.