* [Qemu-devel] [PATCH] spapr: initialize local Error pointer
@ 2016-02-18 14:40 Greg Kurz
2016-02-18 15:02 ` Markus Armbruster
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kurz @ 2016-02-18 14:40 UTC (permalink / raw)
To: David Gibson; +Cc: qemu-trivial, qemu-ppc, qemu-devel
This fixes a crash in the target QEMU during migration.
Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
hw/ppc/spapr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index e214a34257b3..c119f5582429 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id)
section_hdr = qemu_get_be32(f);
if (section_hdr) {
- Error *local_err;
+ Error *local_err = NULL;
/* First section gives the htab size */
spapr_reallocate_hpt(spapr, section_hdr, &local_err);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: initialize local Error pointer
2016-02-18 14:40 [Qemu-devel] [PATCH] spapr: initialize local Error pointer Greg Kurz
@ 2016-02-18 15:02 ` Markus Armbruster
2016-02-18 15:10 ` Greg Kurz
2016-02-19 0:15 ` David Gibson
0 siblings, 2 replies; 4+ messages in thread
From: Markus Armbruster @ 2016-02-18 15:02 UTC (permalink / raw)
To: Greg Kurz; +Cc: qemu-trivial, qemu-ppc, qemu-devel, David Gibson
Greg Kurz <gkurz@linux.vnet.ibm.com> writes:
> This fixes a crash in the target QEMU during migration.
>
> Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857
Suggest to word that as "Broken in commit c5f54f3."
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> ---
> hw/ppc/spapr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index e214a34257b3..c119f5582429 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id)
> section_hdr = qemu_get_be32(f);
>
> if (section_hdr) {
> - Error *local_err;
> + Error *local_err = NULL;
>
> /* First section gives the htab size */
> spapr_reallocate_hpt(spapr, section_hdr, &local_err);
Easy mistake to make (I've made it myself). I wish I had the time to
figure out how to make Coccinelle catch it.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: initialize local Error pointer
2016-02-18 15:02 ` Markus Armbruster
@ 2016-02-18 15:10 ` Greg Kurz
2016-02-19 0:15 ` David Gibson
1 sibling, 0 replies; 4+ messages in thread
From: Greg Kurz @ 2016-02-18 15:10 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-trivial, qemu-ppc, qemu-devel, David Gibson
On Thu, 18 Feb 2016 16:02:53 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Greg Kurz <gkurz@linux.vnet.ibm.com> writes:
>
> > This fixes a crash in the target QEMU during migration.
> >
> > Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857
>
> Suggest to word that as "Broken in commit c5f54f3."
>
This is more explicit indeed. I'll do that for future
patches.
Thanks !
> > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> > ---
> > hw/ppc/spapr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index e214a34257b3..c119f5582429 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id)
> > section_hdr = qemu_get_be32(f);
> >
> > if (section_hdr) {
> > - Error *local_err;
> > + Error *local_err = NULL;
> >
> > /* First section gives the htab size */
> > spapr_reallocate_hpt(spapr, section_hdr, &local_err);
>
> Easy mistake to make (I've made it myself). I wish I had the time to
> figure out how to make Coccinelle catch it.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: initialize local Error pointer
2016-02-18 15:02 ` Markus Armbruster
2016-02-18 15:10 ` Greg Kurz
@ 2016-02-19 0:15 ` David Gibson
1 sibling, 0 replies; 4+ messages in thread
From: David Gibson @ 2016-02-19 0:15 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-trivial, qemu-ppc, qemu-devel, Greg Kurz
[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]
On Thu, Feb 18, 2016 at 04:02:53PM +0100, Markus Armbruster wrote:
> Greg Kurz <gkurz@linux.vnet.ibm.com> writes:
>
> > This fixes a crash in the target QEMU during migration.
> >
> > Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857
>
> Suggest to word that as "Broken in commit c5f54f3."
>
> > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> > ---
> > hw/ppc/spapr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index e214a34257b3..c119f5582429 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id)
> > section_hdr = qemu_get_be32(f);
> >
> > if (section_hdr) {
> > - Error *local_err;
> > + Error *local_err = NULL;
> >
> > /* First section gives the htab size */
> > spapr_reallocate_hpt(spapr, section_hdr, &local_err);
>
> Easy mistake to make (I've made it myself). I wish I had the time to
> figure out how to make Coccinelle catch it.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Applied to ppc-for-2.6 with Markus's suggested rewording. Thanks.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-19 0:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 14:40 [Qemu-devel] [PATCH] spapr: initialize local Error pointer Greg Kurz
2016-02-18 15:02 ` Markus Armbruster
2016-02-18 15:10 ` Greg Kurz
2016-02-19 0:15 ` David Gibson
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).