Skip to content

Commit 51075e0

Browse files
Łukasz Stelmachwilldeacon
authored andcommitted
arm64: kexec_file: print appropriate variable
The value of kbuf->memsz may be different than kbuf->bufsz after calling kexec_add_buffer(). Hence both values should be logged. Fixes: 52b2a8a ("arm64: kexec_file: load initrd and device-tree") Fixes: 3751e72 ("arm64: kexec_file: add crash dump support") Signed-off-by: Łukasz Stelmach <[email protected]> Cc: AKASHI Takahiro <[email protected]> Cc: James Morse <[email protected]> Cc: Bhupesh Sharma <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 037d930 commit 51075e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/kernel/machine_kexec_file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ int load_other_segments(struct kimage *image,
284284
image->arch.elf_headers_sz = headers_sz;
285285

286286
pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
287-
image->arch.elf_headers_mem, headers_sz, headers_sz);
287+
image->arch.elf_headers_mem, kbuf.bufsz, kbuf.memsz);
288288
}
289289

290290
/* load initrd */
@@ -305,7 +305,7 @@ int load_other_segments(struct kimage *image,
305305
initrd_load_addr = kbuf.mem;
306306

307307
pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
308-
initrd_load_addr, initrd_len, initrd_len);
308+
initrd_load_addr, kbuf.bufsz, kbuf.memsz);
309309
}
310310

311311
/* load dtb */
@@ -332,7 +332,7 @@ int load_other_segments(struct kimage *image,
332332
image->arch.dtb_mem = kbuf.mem;
333333

334334
pr_debug("Loaded dtb at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
335-
kbuf.mem, dtb_len, dtb_len);
335+
kbuf.mem, kbuf.bufsz, kbuf.memsz);
336336

337337
return 0;
338338

0 commit comments

Comments
 (0)