Commit 70b69054 authored by Philipp Rudo's avatar Philipp Rudo Committed by Vasily Gorbik

s390/kexec_file: fix initrd location for kdump kernel

initrd_start must not point at the location the initrd is loaded into
the crashkernel memory but at the location it will be after the
crashkernel memory is swapped with the memory at 0.

Fixes: ee337f54 ("s390/kexec_file: Add crash support to image loader")
Reported-by: default avatarLianbo Jiang <lijiang@redhat.com>
Signed-off-by: default avatarPhilipp Rudo <prudo@linux.ibm.com>
Tested-by: default avatarLianbo Jiang <lijiang@redhat.com>
Link: https://lore.kernel.org/r/20200512193956.15ae3f23@laptop2-ibm.localSigned-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent f058599e
...@@ -151,7 +151,7 @@ static int kexec_file_add_initrd(struct kimage *image, ...@@ -151,7 +151,7 @@ static int kexec_file_add_initrd(struct kimage *image,
buf.mem += crashk_res.start; buf.mem += crashk_res.start;
buf.memsz = buf.bufsz; buf.memsz = buf.bufsz;
data->parm->initrd_start = buf.mem; data->parm->initrd_start = data->memsz;
data->parm->initrd_size = buf.memsz; data->parm->initrd_size = buf.memsz;
data->memsz += buf.memsz; data->memsz += buf.memsz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment