All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qxl: fix pre-save logic
@ 2021-09-10  9:42 Gerd Hoffmann
  2021-09-10  9:53 ` Marc-André Lureau
  2021-09-10 10:08 ` Daniel P. Berrangé
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2021-09-10  9:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Oops.  Logic is backwards.

Fixes: 39b8a183e2f3 ("qxl: remove assert in qxl_pre_save.")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/610
Resolves: https://bugzilla.redhat.com//show_bug.cgi?id=2002907
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/qxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 43482d4364ba..29c80b4289b7 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2252,7 +2252,7 @@ static int qxl_pre_save(void *opaque)
     } else {
         d->last_release_offset = (uint8_t *)d->last_release - ram_start;
     }
-    if (d->last_release_offset < d->vga.vram_size) {
+    if (d->last_release_offset >= d->vga.vram_size) {
         return 1;
     }
 
-- 
2.31.1



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

* Re: [PATCH] qxl: fix pre-save logic
  2021-09-10  9:42 [PATCH] qxl: fix pre-save logic Gerd Hoffmann
@ 2021-09-10  9:53 ` Marc-André Lureau
  2021-09-10 10:08 ` Daniel P. Berrangé
  1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2021-09-10  9:53 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

On Fri, Sep 10, 2021 at 1:43 PM Gerd Hoffmann <kraxel@redhat.com> wrote:

> Oops.  Logic is backwards.
>
> Fixes: 39b8a183e2f3 ("qxl: remove assert in qxl_pre_save.")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/610
> Resolves: https://bugzilla.redhat.com//show_bug.cgi?id=2002907
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>

Argh..
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  hw/display/qxl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 43482d4364ba..29c80b4289b7 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -2252,7 +2252,7 @@ static int qxl_pre_save(void *opaque)
>      } else {
>          d->last_release_offset = (uint8_t *)d->last_release - ram_start;
>      }
> -    if (d->last_release_offset < d->vga.vram_size) {
> +    if (d->last_release_offset >= d->vga.vram_size) {
>          return 1;
>      }
>
> --
> 2.31.1
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2009 bytes --]

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

* Re: [PATCH] qxl: fix pre-save logic
  2021-09-10  9:42 [PATCH] qxl: fix pre-save logic Gerd Hoffmann
  2021-09-10  9:53 ` Marc-André Lureau
@ 2021-09-10 10:08 ` Daniel P. Berrangé
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2021-09-10 10:08 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

On Fri, Sep 10, 2021 at 11:42:03AM +0200, Gerd Hoffmann wrote:
> Oops.  Logic is backwards.
> 
> Fixes: 39b8a183e2f3 ("qxl: remove assert in qxl_pre_save.")

Urgh, I looked at that commit yesterday several times and
was blind to the bug too !

> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/610
> Resolves: https://bugzilla.redhat.com//show_bug.cgi?id=2002907
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/qxl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 43482d4364ba..29c80b4289b7 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -2252,7 +2252,7 @@ static int qxl_pre_save(void *opaque)
>      } else {
>          d->last_release_offset = (uint8_t *)d->last_release - ram_start;
>      }
> -    if (d->last_release_offset < d->vga.vram_size) {
> +    if (d->last_release_offset >= d->vga.vram_size) {
>          return 1;
>      }
>  
> -- 
> 2.31.1
> 
> 

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] 3+ messages in thread

end of thread, other threads:[~2021-09-10 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  9:42 [PATCH] qxl: fix pre-save logic Gerd Hoffmann
2021-09-10  9:53 ` Marc-André Lureau
2021-09-10 10:08 ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.