From: Rob Herring <robh@kernel.org>
To: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Cc: devicetree@vger.kernel.org, bauerman@linux.ibm.com,
christophe.leroy@csgroup.eu, dan.carpenter@oracle.com,
mpe@ellerman.id.au, lkp@intel.com, dja@axtens.net,
linuxppc-dev@lists.ozlabs.org, kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/2] powerpc: Free fdt on error in elf64_load()
Date: Mon, 26 Apr 2021 16:25:20 -0500 [thread overview]
Message-ID: <20210426212520.GA4112479@robh.at.kernel.org> (raw)
In-Reply-To: <20210421163610.23775-1-nramas@linux.microsoft.com>
On Wed, 21 Apr 2021 09:36:09 -0700, Lakshmi Ramasubramanian wrote:
> There are a few "goto out;" statements before the local variable "fdt"
> is initialized through the call to of_kexec_alloc_and_setup_fdt() in
> elf64_load(). This will result in an uninitialized "fdt" being passed
> to kvfree() in this function if there is an error before the call to
> of_kexec_alloc_and_setup_fdt().
>
> If there is any error after fdt is allocated, but before it is
> saved in the arch specific kimage struct, free the fdt.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
> ---
> arch/powerpc/kexec/elf_64.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
Applied, thanks!
prev parent reply other threads:[~2021-04-26 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 16:36 [PATCH v2 1/2] powerpc: Free fdt on error in elf64_load() Lakshmi Ramasubramanian
2021-04-21 16:36 ` [PATCH v2 2/2] powerpc: If kexec_build_elf_info() fails return immediately from elf64_load() Lakshmi Ramasubramanian
2021-04-26 21:26 ` Rob Herring
2021-04-23 17:34 ` [PATCH v2 1/2] powerpc: Free fdt on error in elf64_load() Lakshmi Ramasubramanian
2021-04-26 21:25 ` 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=20210426212520.GA4112479@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=bauerman@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=dja@axtens.net \
--cc=kbuild-all@lists.01.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.com \
--cc=mpe@ellerman.id.au \
--cc=nramas@linux.microsoft.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).