]> git.proxmox.com Git - mirror_qemu.git/commit
sun4u: ensure kernel_top is always initialised
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 10 Aug 2018 10:40:37 +0000 (11:40 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 20 Aug 2018 18:18:31 +0000 (19:18 +0100)
commit3ac24188eccffe4b6038b47f446c3472897abdf4
tree2b3b4127f16c5dae84442d52202ce460675c5f73
parentd0092d90eb546a8bbe9e9120426c189474123797
sun4u: ensure kernel_top is always initialised

Valgrind reports that when loading a non-ELF kernel, kernel_top may be used
uninitialised when checking for an initrd.

Since there are no known non-ELF kernels for SPARC64 then we can simply
initialise kernel_top to 0 and then skip the initrd load process if it hasn't
been set by load_elf().

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/sparc64/sun4u.c