All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>, mturquette@baylibre.com
Cc: linux-clk@vger.kernel.org, Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Subject: Re: [PATCH] clk: fix an OF node reference leak in of_clk_get_parent_name()
Date: Tue, 10 Dec 2024 14:54:13 -0800	[thread overview]
Message-ID: <93eead72b24cf69a871e88ba93bc13ef.sboyd@kernel.org> (raw)
In-Reply-To: <20241210130913.3615205-1-joe@pf.is.s.u-tokyo.ac.jp>

Quoting Joe Hattori (2024-12-10 05:09:12)
> Current implementation of of_clk_get_parent_name() leaks an OF node
> reference on error path. Add a of_node_put() call before returning an
> error.
> 
> This bug was found by an experimental static analysis tool that I am
> developing.
> 
> Fixes: 8da411cc1964 ("clk: let of_clk_get_parent_name() fail for invalid clock-indices")
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
> ---

Applied to clk-next

      reply	other threads:[~2024-12-10 22:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 13:09 [PATCH] clk: fix an OF node reference leak in of_clk_get_parent_name() Joe Hattori
2024-12-10 22:54 ` Stephen Boyd [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=93eead72b24cf69a871e88ba93bc13ef.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=joe@pf.is.s.u-tokyo.ac.jp \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.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 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.