Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kexec@lists.infradead.org, dyoung@redhat.com,
	akpm@linux-foundation.org, Baoquan He <bhe@redhat.com>
Subject: [PATCH 0/3] x86/kexec: fix memory leak of elf header buffer
Date: Fri, 29 Oct 2021 15:24:21 +0800	[thread overview]
Message-ID: <20211029072424.9109-1-bhe@redhat.com> (raw)

The memory leak is reported by kmemleak detector, has been existing
for very long time. It could casue much memory loss on large machine
with huge memory hotplug which will trigger kdump kernel reloading
many times, with kexec_file_load interface.

And in patch 2, 3, clean up is done to remove unnecessary elf header
buffer freeing and unneeded arch_kexec_kernel_image_load().

Baoquan He (3):
  x86/kexec: fix memory leak of elf header buffer
  x86/kexec: remove incorrect elf header buffer freeing
  kexec_file: clean up arch_kexec_kernel_image_load

 arch/x86/kernel/machine_kexec_64.c | 23 +++++++++--------------
 include/linux/kexec.h              |  1 -
 kernel/kexec_file.c                |  9 ++-------
 3 files changed, 11 insertions(+), 22 deletions(-)

-- 
2.17.2


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2021-10-29  7:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  7:24 Baoquan He [this message]
2021-10-29  7:24 ` [PATCH 1/3] x86/kexec: fix memory leak of elf header buffer Baoquan He
2021-11-22  1:55   ` Baoquan He
2021-10-29  7:24 ` [PATCH 2/3] x86/kexec: remove incorrect elf header buffer freeing Baoquan He
2021-10-29  7:24 ` [PATCH 3/3] kexec_file: clean up arch_kexec_kernel_image_load Baoquan He
2021-11-01  6:54 ` [PATCH 0/3] x86/kexec: fix memory leak of elf header buffer Dave Young

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=20211029072424.9109-1-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.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