From: Rob Herring <robh@kernel.org>
To: Evan Nimmo <evan.nimmo@alliedtelesis.co.nz>
Cc: linux-kernel@vger.kernel.org, frowand.list@gmail.com,
robh+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] of/address: Fix of_node memory leak in of_dma_is_coherent
Date: Wed, 11 Nov 2020 13:07:47 -0600 [thread overview]
Message-ID: <20201111190747.GA1844086@bogus> (raw)
In-Reply-To: <20201110022825.30895-1-evan.nimmo@alliedtelesis.co.nz>
On Tue, 10 Nov 2020 15:28:25 +1300, Evan Nimmo wrote:
> Commit dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on
> powerpc") added a check to of_dma_is_coherent which returns early
> if OF_DMA_DEFAULT_COHERENT is enabled. This results in the of_node_put()
> being skipped causing a memory leak. Moved the of_node_get() below this
> check so we now we only get the node if OF_DMA_DEFAULT_COHERENT is not
> enabled.
>
> Fixes: dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on
> powerpc")
>
> Signed-off-by: Evan Nimmo <evan.nimmo@alliedtelesis.co.nz>
> ---
> drivers/of/address.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Applied, thanks!
prev parent reply other threads:[~2020-11-11 19:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 2:28 [PATCH] of/address: Fix of_node memory leak in of_dma_is_coherent Evan Nimmo
2020-11-11 19:07 ` 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=20201111190747.GA1844086@bogus \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=evan.nimmo@alliedtelesis.co.nz \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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 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).