linux-mm.kvack.org archive mirror
 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, bhe@redhat.com, x86@kernel.org,
	linux-mm@kvack.org
Subject: [PATCH v2 0/2] x86/kexec: fix memory leak of elf header buffer
Date: Wed, 23 Feb 2022 19:32:23 +0800	[thread overview]
Message-ID: <20220223113225.63106-1-bhe@redhat.com> (raw)

The memory leak is reported by kmemleak detector, has been existing
for very long time. It 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, clean up is done to remove unneeded
arch_kexec_kernel_image_load() and rename functions.

V1 post can be found here:
https://lore.kernel.org/all/20211029072424.9109-1-bhe@redhat.com/T/#u

v1->v2:
 No code change. The v1 post has been acked by Dave Young but not
merged. In v2, just merging the old patch 1 and 2 as per Dave's concern
in v1 post.

Baoquan He (2):
  x86/kexec: fix memory leak of elf header buffer
  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.31.1



             reply	other threads:[~2022-02-23 11:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 11:32 Baoquan He [this message]
2022-02-23 11:32 ` [PATCH v2 1/2] " Baoquan He
2022-02-23 11:32 ` [PATCH v2 2/2] kexec_file: clean up arch_kexec_kernel_image_load Baoquan He
2022-03-31 11:32 ` [PATCH v2 0/2] x86/kexec: fix memory leak of elf header buffer Baoquan He
2022-04-13  2:27   ` Andrew Morton
2022-04-13  2:47     ` Baoquan He
2022-04-13  8:32       ` Borislav Petkov

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=20220223113225.63106-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 \
    --cc=linux-mm@kvack.org \
    --cc=x86@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