x86/pv: Fix error handling in dom0_construct_pv()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 May 2019 10:14:01 +0000 (10:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 May 2019 14:59:00 +0000 (15:59 +0100)
commit8207314d985f89ca6920066d1054be33c8419e78
tree14cd2970a54f5e27ae388471a3ebe71397833732
parent2eed83a9aa1a12d47512675eff31ac2abed25c4f
x86/pv: Fix error handling in dom0_construct_pv()

One path in dom0_construct_pv() returns -1 unlike all other error paths.
Switch it to returning -EINVAL.

This was last modified by c/s c84481fb XSA-55, but the bug predates that
series.  However, this patch did (for no obvious reason) introduce a
bifurcated tail to the function with two subtly different elf_check_broken()
clauses.

As the elf_check_broken() is just a warning and doesn't influence the further
boot, fold the exit paths together and use a single clause.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/pv/dom0_build.c