qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] audio/hda: fix guest triggerable assert


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] audio/hda: fix guest triggerable assert
Date: Thu, 22 Nov 2018 15:52:12 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

* Gerd Hoffmann (address@hidden) wrote:
> Guest writes to a readonly register trigger the assert in
> intel_hda_reg_write().  Add a check and just ignore them.
> 
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1628433
> Signed-off-by: Gerd Hoffmann <address@hidden>

Does make you wonder:
  a) Why the guest was writing to a read-only register
  b) Wth it only did it in the weird combination of
     devices tested.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>

> ---
>  hw/audio/intel-hda.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
> index 23a2cf6484..066532713c 100644
> --- a/hw/audio/intel-hda.c
> +++ b/hw/audio/intel-hda.c
> @@ -929,6 +929,10 @@ static void intel_hda_reg_write(IntelHDAState *d, const 
> IntelHDAReg *reg, uint32
>      if (!reg) {
>          return;
>      }
> +    if (!reg->wmask) {
> +        /* read-only register */
> +        return;
> +    }
>  
>      if (d->debug) {
>          time_t now = time(NULL);
> -- 
> 2.9.3
> 
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]