mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: make24@iscas.ac.cn, linux-pci@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Thierry Reding <treding@nvidia.com>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] PCI: fix reference leak in pci_register_host_bridge()
Date: Sun, 5 Jan 2025 21:26:40 +0100	[thread overview]
Message-ID: <c80c06f6-d283-4687-bf32-9b6be19c8257@web.de> (raw)
In-Reply-To: <20250105105927.276661-1-make24@iscas.ac.cn>

> Once device_register() failed, we should call put_device() to
> decrement reference count for cleanup. Or it could cause memory leak.
>
> device_register() includes device_add(). As comment of device_add()
…

I doubt that the information from the second description paragraph is helpful
for this issue.


> Found by code review.

Would you become interested to check how many similar control flows
can still be detected by the means of automated advanced source code analyses?

Regards,
Markus

      reply	other threads:[~2025-01-05 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05 10:59 Ma Ke
2025-01-05 20:26 ` Markus Elfring [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=c80c06f6-d283-4687-bf32-9b6be19c8257@web.de \
    --to=markus.elfring@web.de \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=stable@vger.kernel.org \
    --cc=treding@nvidia.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®