Skip to content

x86/kexec: fix memory leak of elf header buffer

Baoquan He kexec linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 4 repliesIn review 1 of 2 applied
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

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.

Patches in v2 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2x86/kexec: fix memory leak of elf header bufferarch/x86/kernel/machine_kexec_64.c+9 -30 repliesApplied
2/2kexec_file: clean up arch_kexec_kernel_image_loadarch/x86/kernel/machine_kexec_64.c include/linux/kexec.h kernel/kexec_file.c+2 -190 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDave Young
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] x86/kexec: fix memory leak of elf header buffer

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 at 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(-)
Signature · 1 line
2.31.1