qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] audio/hda: Fix migration
@ 2018-07-24 10:22 Dr. David Alan Gilbert (git)
  2018-07-24 10:36 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2018-07-24 10:22 UTC (permalink / raw)
  To: qemu-devel, kraxel, berrange, quintela, marcandre.lureau

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Fix outgoing migration which was crashing in
vmstate_hda_audio_stream_buf_needed, I think the problem
is that we have room for upto 4 streams in the array but only
use 2, when we come to try and save the state of the unused
streams we hit st->state == NULL.

Fixes: 280c1e1cdb24d80ecdfc
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hw/audio/hda-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index 2b58c3505b..617a1c1016 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -786,7 +786,7 @@ static void hda_audio_reset(DeviceState *dev)
 static bool vmstate_hda_audio_stream_buf_needed(void *opaque)
 {
     HDAAudioStream *st = opaque;
-    return st->state->use_timer;
+    return st->state && st->state->use_timer;
 }
 
 static const VMStateDescription vmstate_hda_audio_stream_buf = {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] audio/hda: Fix migration
  2018-07-24 10:22 [Qemu-devel] [PATCH] audio/hda: Fix migration Dr. David Alan Gilbert (git)
@ 2018-07-24 10:36 ` Daniel P. Berrangé
  2018-07-24 13:29 ` Juan Quintela
  2018-07-24 16:02 ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2018-07-24 10:36 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: qemu-devel, kraxel, quintela, marcandre.lureau

On Tue, Jul 24, 2018 at 11:22:15AM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Fix outgoing migration which was crashing in
> vmstate_hda_audio_stream_buf_needed, I think the problem
> is that we have room for upto 4 streams in the array but only
> use 2, when we come to try and save the state of the unused
> streams we hit st->state == NULL.
> 
> Fixes: 280c1e1cdb24d80ecdfc
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  hw/audio/hda-codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] audio/hda: Fix migration
  2018-07-24 10:22 [Qemu-devel] [PATCH] audio/hda: Fix migration Dr. David Alan Gilbert (git)
  2018-07-24 10:36 ` Daniel P. Berrangé
@ 2018-07-24 13:29 ` Juan Quintela
  2018-07-24 16:02 ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2018-07-24 13:29 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: qemu-devel, kraxel, berrange, marcandre.lureau

"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Fix outgoing migration which was crashing in
> vmstate_hda_audio_stream_buf_needed, I think the problem
> is that we have room for upto 4 streams in the array but only
> use 2, when we come to try and save the state of the unused
> streams we hit st->state == NULL.
>
> Fixes: 280c1e1cdb24d80ecdfc
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] audio/hda: Fix migration
  2018-07-24 10:22 [Qemu-devel] [PATCH] audio/hda: Fix migration Dr. David Alan Gilbert (git)
  2018-07-24 10:36 ` Daniel P. Berrangé
  2018-07-24 13:29 ` Juan Quintela
@ 2018-07-24 16:02 ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2018-07-24 16:02 UTC (permalink / raw)
  To: qemu-devel, kraxel, berrange, quintela, marcandre.lureau

* Dr. David Alan Gilbert (git) (dgilbert@redhat.com) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Fix outgoing migration which was crashing in
> vmstate_hda_audio_stream_buf_needed, I think the problem
> is that we have room for upto 4 streams in the array but only
> use 2, when we come to try and save the state of the unused
> streams we hit st->state == NULL.
> 
> Fixes: 280c1e1cdb24d80ecdfc
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Queued via migration

> ---
>  hw/audio/hda-codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
> index 2b58c3505b..617a1c1016 100644
> --- a/hw/audio/hda-codec.c
> +++ b/hw/audio/hda-codec.c
> @@ -786,7 +786,7 @@ static void hda_audio_reset(DeviceState *dev)
>  static bool vmstate_hda_audio_stream_buf_needed(void *opaque)
>  {
>      HDAAudioStream *st = opaque;
> -    return st->state->use_timer;
> +    return st->state && st->state->use_timer;
>  }
>  
>  static const VMStateDescription vmstate_hda_audio_stream_buf = {
> -- 
> 2.17.1
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-24 16:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24 10:22 [Qemu-devel] [PATCH] audio/hda: Fix migration Dr. David Alan Gilbert (git)
2018-07-24 10:36 ` Daniel P. Berrangé
2018-07-24 13:29 ` Juan Quintela
2018-07-24 16:02 ` Dr. David Alan Gilbert

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).