# \[PATCH v2 0/3\] powerpc/kexec\_file: Fix some bugs

- From: Jinjie Ruan \<hidden\>
- Date: 2026-07-29 01:29:39 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2026/07/17332584
- Thread: https://ratatoskr.run/linuxppc-dev/2026/07/17332584/t.md

```text
Fix some powerpc bugs pointed out by Sashiko AI:
- Memory leak
- Null-ptr-def
- Overlapping memory range truncation .

Link: https://lore.kernel.org/all/20260601094805.2928614-1-ruanjinjie@huawei.com/

Changes in v2:
- Split Powerpc bugfix patch into this separate patch set.
- v1: https://lore.kernel.org/all/20260723131242.1537633-1-ruanjinjie@huawei.com/#t

Jinjie Ruan (3):
  powerpc/crash: Fix possible memory leak in update_crash_elfcorehdr()
  powerpc/kexec_file: Fix null-ptr-def in extra size calculation
  powerpc/kexec_file: Prevent kexec range truncation

 arch/powerpc/kexec/crash.c        |  2 +-
 arch/powerpc/kexec/file_load_64.c |  2 +-
 arch/powerpc/kexec/ranges.c       | 12 +++++-------
 3 files changed, 7 insertions(+), 9 deletions(-)

-- 
2.34.1


```
