zgetdump: return -EINVAL for user space core dumps

zgetdump is for analyzing VM coredumps and not user space coredumps therefore
return an error in case of a user space coredump.

Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2021-09-07 11:59:15 +00:00
committed by Jan Höppner
parent 533df585fd
commit 0a8e726d05

View File

@@ -48,6 +48,7 @@ static int pt_load_add(Elf64_Phdr *phdr)
phdr->p_paddr = phdr->p_vaddr;
STDERR("Dump file \"%s\" is a user space core dump\n",
g.opts.device);
return -EINVAL;
}
if (phdr->p_memsz == 0)
return -EINVAL;