public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Zijun Hu <zijun_hu@icloud.com>
Cc: Saravana Kannan <saravanak@google.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Stephen Boyd <stephen.boyd@linaro.org>,
	Maxime Ripard <mripard@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zijun Hu <quic_zijuhu@quicinc.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 04/10] of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
Date: Mon, 9 Dec 2024 14:32:00 -0600	[thread overview]
Message-ID: <20241209203200.GA925532-robh@kernel.org> (raw)
In-Reply-To: <20241206-of_core_fix-v1-4-dc28ed56bec3@quicinc.com>

On Fri, Dec 06, 2024 at 08:52:30AM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@quicinc.com>
> 
> __of_get_dma_parent() returns OF device node @args.np, but the node's
> refcount is increased twice, by both of_parse_phandle_with_args() and
> of_node_get(), so causes refcount leakage for the node.
> 
> Fix by directly returning the node got by of_parse_phandle_with_args().
> 
> Fixes: f83a6e5dea6c ("of: address: Add support for the parent DMA bus")
> Cc: stable@vger.kernel.org
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---
>  drivers/of/address.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Rob

      reply	other threads:[~2024-12-09 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06  0:52 [PATCH 00/10] of: fix bugs and improve codes Zijun Hu
2024-12-06  0:52 ` [PATCH 01/10] of: Fix alias name length calculating error in API of_find_node_opts_by_path() Zijun Hu
2024-12-09 13:24   ` Rob Herring
2024-12-09 13:31     ` Zijun Hu
2024-12-06  0:52 ` [PATCH 02/10] of: Correct return value for API of_parse_phandle_with_args_map() Zijun Hu
2024-12-09 13:26   ` Rob Herring
2024-12-06  0:52 ` [PATCH 03/10] of: Correct child specifier used as input of the 2nd nexus node Zijun Hu
2024-12-06  0:52 ` [PATCH 04/10] of: Fix refcount leakage for OF node returned by __of_get_dma_parent() Zijun Hu
2024-12-09 20:32   ` Rob Herring [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=20241209203200.GA925532-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=quic_zijuhu@quicinc.com \
    --cc=robin.murphy@arm.com \
    --cc=saravanak@google.com \
    --cc=stable@vger.kernel.org \
    --cc=stephen.boyd@linaro.org \
    --cc=zijun_hu@icloud.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