* [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails
@ 2019-01-04 9:06 Cédric Le Goater
2019-01-04 10:08 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2019-01-04 9:06 UTC (permalink / raw)
To: David Gibson; +Cc: qemu-ppc, qemu-devel, Cédric Le Goater
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.
Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
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 f1725313e979..64397ee91ef0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1748,12 +1748,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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails
2019-01-04 9:06 [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails Cédric Le Goater
@ 2019-01-04 10:08 ` Peter Maydell
2019-01-04 12:31 ` Cédric Le Goater
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2019-01-04 10:08 UTC (permalink / raw)
To: Cédric Le Goater; +Cc: David Gibson, qemu-ppc, QEMU Developers
On Fri, 4 Jan 2019 at 09:07, Cédric Le Goater <clg@kaod.org> wrote:
>
> 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.
>
> Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
You could also mention that this fixes the Coverity
issue CID 1398591.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails
2019-01-04 10:08 ` Peter Maydell
@ 2019-01-04 12:31 ` Cédric Le Goater
2019-01-04 12:43 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2019-01-04 12:31 UTC (permalink / raw)
To: Peter Maydell; +Cc: David Gibson, qemu-ppc, QEMU Developers
On 1/4/19 11:08 AM, Peter Maydell wrote:
> On Fri, 4 Jan 2019 at 09:07, Cédric Le Goater <clg@kaod.org> wrote:
>>
>> 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.
>>
>> Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
>
> You could also mention that this fixes the Coverity
> issue CID 1398591.
ok. I will in a v2.
Is there a tag for it ?
or adding a comment "this fixes the Coverity issue CID 1398591."
is considered sufficient ?
Thanks,
C.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails
2019-01-04 12:31 ` Cédric Le Goater
@ 2019-01-04 12:43 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-01-04 12:43 UTC (permalink / raw)
To: Cédric Le Goater; +Cc: David Gibson, qemu-ppc, QEMU Developers
On Fri, 4 Jan 2019 at 12:31, Cédric Le Goater <clg@kaod.org> wrote:
>
> On 1/4/19 11:08 AM, Peter Maydell wrote:
> > On Fri, 4 Jan 2019 at 09:07, Cédric Le Goater <clg@kaod.org> wrote:
> >>
> >> 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.
> >>
> >> Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
> >
> > You could also mention that this fixes the Coverity
> > issue CID 1398591.
>
> ok. I will in a v2.
>
> Is there a tag for it ?
>
> or adding a comment "this fixes the Coverity issue CID 1398591."
> is considered sufficient ?
No, we don't have a formal tag for that kind of thing.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-04 12:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-04 9:06 [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails Cédric Le Goater
2019-01-04 10:08 ` Peter Maydell
2019-01-04 12:31 ` Cédric Le Goater
2019-01-04 12:43 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).