summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/crash_dump.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c
index c3620bafc374..4b2773e1ddfe 100644
--- a/arch/s390/kernel/crash_dump.c
+++ b/arch/s390/kernel/crash_dump.c
@@ -478,26 +478,20 @@ static void *nt_vmcoreinfo(void *ptr)
static size_t nt_vmcoreinfo_size(void)
{
- const char *name = "VMCOREINFO";
- char nt_name[11];
- Elf64_Nhdr note;
- void *addr;
-
- if (copy_oldmem_kernel(&addr, &S390_lowcore.vmcore_info, sizeof(addr)))
- return 0;
-
- if (copy_oldmem_kernel(&note, addr, sizeof(note)))
- return 0;
+ const char *name = VMCOREINFO_NOTE_NAME;
+ unsigned long size;
+ void *vmcoreinfo;
- memset(nt_name, 0, sizeof(nt_name));
- if (copy_oldmem_kernel(nt_name, addr + sizeof(note),
- sizeof(nt_name) - 1))
- return 0;
+ vmcoreinfo = os_info_old_entry(OS_INFO_VMCOREINFO, &size);
+ if (vmcoreinfo)
+ return nt_size_name(size, name);
- if (strcmp(nt_name, name) != 0)
+ vmcoreinfo = get_vmcoreinfo_old(&size);
+ if (!vmcoreinfo)
return 0;
- return nt_size_name(note.n_descsz, name);
+ kfree(vmcoreinfo);
+ return nt_size_name(size, name);
}
/*
OpenPOWER on IntegriCloud