DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Tomasz Zawadzki <tomasz.zawadzki@intel.com>,
	 Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH] bus/pci: fix leak with multiple bus scan
Date: Tue, 22 Nov 2022 16:07:04 +0100	[thread overview]
Message-ID: <CAJFAV8wTFDd+zXoNT48Bvufvko2dk3tgOizWCNioOFb9dmoTaQ@mail.gmail.com> (raw)
In-Reply-To: <20221121111209.2396341-1-david.marchand@redhat.com>

On Mon, Nov 21, 2022 at 12:12 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> The addition of the bus_info field did not account for the fact that the
> PCI bus can be scanned multiple times (like for device hotplug and other
> uses in SPDK).
> Indeed, during pci_scan_one() for devices that were already registered,
> the pci_common_set() overwrites the bus_info field, leaking the
> previously allocated memory.
>
> Since the bus_info content is fixed for a PCI device, we can simply skip
> allocation if dev->bus_info is already set.
>
> Fixes: 8f4de2dba9b9 ("bus/pci: fill bus specific information")
>
> Reported-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

I did not hear feedback, nor objection.
The patch is simple, and it fixes a regression in the release.
So I'm taking this patch for rc4.

Applied, thanks.


-- 
David Marchand


      reply	other threads:[~2022-11-22 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 11:12 David Marchand
2022-11-22 15:07 ` David Marchand [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=CAJFAV8wTFDd+zXoNT48Bvufvko2dk3tgOizWCNioOFb9dmoTaQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=tomasz.zawadzki@intel.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;
as well as URLs for NNTP newsgroup(s).