s390/dump: fix copying to user-space of swapped kdump oldmem
authorAlexander Egorenkov <egorenar@linux.ibm.com>
Mon, 15 Nov 2021 06:40:25 +0000 (07:40 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 18 Nov 2021 16:25:34 +0000 (17:25 +0100)
commit3b90954419d4c05651de9cce6d7632bcf6977678
tree26a9c9c48af9907701f2760ebf87c8d2a938d8fc
parent6c122360cf2f4c5a856fcbd79b4485b7baec942a
s390/dump: fix copying to user-space of swapped kdump oldmem

This commit fixes a bug introduced by commit e9e7870f90e3 ("s390/dump:
introduce boot data 'oldmem_data'").
OLDMEM_BASE was mistakenly replaced by oldmem_data.size instead of
oldmem_data.start.

This bug caused the following error during kdump:
kdump.sh[878]: No program header covering vaddr 0x3434f5245found kexec bug?

Fixes: e9e7870f90e3 ("s390/dump: introduce boot data 'oldmem_data'")
Cc: stable@vger.kernel.org # 5.15+
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/crash_dump.c