[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/29] spapr: return from post_load method when RTC i
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 23/29] spapr: return from post_load method when RTC import fails |
Date: |
Wed, 9 Jan 2019 09:45:54 +1100 |
From: Cédric Le Goater <address@hidden>
The error value can be squashed by the section handling radix migration.
Simply bail out if an error occurs when the RTC offset is imported.
This fixes the Coverity issue CID 1398591.
Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 8576c1c6f7..59faeccf4b 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1747,12 +1747,17 @@ static int spapr_post_load(void *opaque, int version_id)
return err;
}
- /* In earlier versions, there was no separate qdev for the PAPR
+ /*
+ * In earlier versions, there was no separate qdev for the PAPR
* RTC, so the RTC offset was stored directly in sPAPREnvironment.
* So when migrating from those versions, poke the incoming offset
- * value into the RTC device */
+ * value into the RTC device
+ */
if (version_id < 3) {
err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset);
+ if (err) {
+ return err;
+ }
}
if (kvm_enabled() && spapr->patb_entry) {
--
2.20.1
- [Qemu-devel] [PULL 27/29] ppc/xics: allow ICSState to have an offset 0, (continued)
- [Qemu-devel] [PULL 27/29] ppc/xics: allow ICSState to have an offset 0, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 21/29] ppc/xive: introduce a XiveTCTX pointer under PowerPCCPU, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 19/29] spapr/xive: simplify the sPAPR IRQ qirq method for XIVE, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 28/29] spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 20/29] spapr: modify the prototype of the cpu_intc_create() method, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 24/29] ppc: export the XICS and XIVE set_irq handlers, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 26/29] spapr: move the qemu_irq array under the machine, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 29/29] spapr: enable XIVE MMIOs at reset, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 25/29] pnv/psi: move the ICSState qemu_irq array under the PSI device model, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 22/29] ppc: replace the 'Object *intc' by a 'ICPState *icp' pointer under the CPU, David Gibson, 2019/01/08
- [Qemu-devel] [PULL 23/29] spapr: return from post_load method when RTC import fails,
David Gibson <=
- Re: [Qemu-devel] [PULL 00/29] ppc-for-4.0 queue 20190109, Peter Maydell, 2019/01/09