[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] audio/hda: Fix migration
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH] audio/hda: Fix migration |
Date: |
Tue, 24 Jul 2018 17:02:27 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
* Dr. David Alan Gilbert (git) (address@hidden) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> 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 <address@hidden>
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 / address@hidden / Manchester, UK