Skip to content

Commit 3b90954

Browse files
eaibmzhcahca
authored andcommitted
s390/dump: fix copying to user-space of swapped kdump oldmem
This commit fixes a bug introduced by commit e9e7870 ("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: e9e7870 ("s390/dump: introduce boot data 'oldmem_data'") Cc: [email protected] # 5.15+ Signed-off-by: Alexander Egorenkov <[email protected]> Reviewed-by: Marc Hartmayer <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 6c12236 commit 3b90954

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/kernel/crash_dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ static int copy_oldmem_user(void __user *dst, void *src, size_t count)
191191
return rc;
192192
} else {
193193
/* Check for swapped kdump oldmem areas */
194-
if (oldmem_data.start && from - oldmem_data.size < oldmem_data.size) {
195-
from -= oldmem_data.size;
194+
if (oldmem_data.start && from - oldmem_data.start < oldmem_data.size) {
195+
from -= oldmem_data.start;
196196
len = min(count, oldmem_data.size - from);
197197
} else if (oldmem_data.start && from < oldmem_data.size) {
198198
len = min(count, oldmem_data.size - from);

0 commit comments

Comments
 (0)