All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qxl: fix segfault
@ 2020-11-24 12:29 Gerd Hoffmann
  2020-11-24 12:44 ` Marc-André Lureau
  2020-11-26 15:40 ` Marc-André Lureau
  0 siblings, 2 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-11-24 12:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."

Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/console.c b/ui/console.c
index e07d2c380df7..53dee8e26b17 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
 
 void graphic_hw_update_done(QemuConsole *con)
 {
-    qemu_co_queue_restart_all(&con->dump_queue);
+    if (con) {
+        qemu_co_queue_restart_all(&con->dump_queue);
+    }
 }
 
 void graphic_hw_update(QemuConsole *con)
-- 
2.27.0



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

* Re: [PATCH] qxl: fix segfault
  2020-11-24 12:29 [PATCH] qxl: fix segfault Gerd Hoffmann
@ 2020-11-24 12:44 ` Marc-André Lureau
  2020-11-26 15:40 ` Marc-André Lureau
  1 sibling, 0 replies; 5+ messages in thread
From: Marc-André Lureau @ 2020-11-24 12:44 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU

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

Hi

On Tue, Nov 24, 2020 at 4:30 PM Gerd Hoffmann <kraxel@redhat.com> wrote:

> Add missing sanity check.
> Reproducer: run qemu with "-device qxl" but without "-spice ..."
>
> Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  ui/console.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ui/console.c b/ui/console.c
> index e07d2c380df7..53dee8e26b17 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
>
>  void graphic_hw_update_done(QemuConsole *con)
>  {
> -    qemu_co_queue_restart_all(&con->dump_queue);
> +    if (con) {
> +        qemu_co_queue_restart_all(&con->dump_queue);
> +    }
>  }
>
>  void graphic_hw_update(QemuConsole *con)
> --
> 2.27.0
>
>
>
Interesting case...
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

thanks

-- 
Marc-André Lureau

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

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

* Re: [PATCH] qxl: fix segfault
  2020-11-24 12:29 [PATCH] qxl: fix segfault Gerd Hoffmann
  2020-11-24 12:44 ` Marc-André Lureau
@ 2020-11-26 15:40 ` Marc-André Lureau
  2020-11-26 18:05   ` Peter Maydell
  1 sibling, 1 reply; 5+ messages in thread
From: Marc-André Lureau @ 2020-11-26 15:40 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Paolo Bonzini, QEMU

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

Hi

On Tue, Nov 24, 2020 at 4:30 PM Gerd Hoffmann <kraxel@redhat.com> wrote:

> Add missing sanity check.
> Reproducer: run qemu with "-device qxl" but without "-spice ..."
>
> Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>

It would be nice to include this regression fix in the release. Anyone
taking the patch to PR?

---
>  ui/console.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ui/console.c b/ui/console.c
> index e07d2c380df7..53dee8e26b17 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
>
>  void graphic_hw_update_done(QemuConsole *con)
>  {
> -    qemu_co_queue_restart_all(&con->dump_queue);
> +    if (con) {
> +        qemu_co_queue_restart_all(&con->dump_queue);
> +    }
>  }
>
>  void graphic_hw_update(QemuConsole *con)
> --
> 2.27.0
>
>
>

-- 
Marc-André Lureau

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

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

* Re: [PATCH] qxl: fix segfault
  2020-11-26 15:40 ` Marc-André Lureau
@ 2020-11-26 18:05   ` Peter Maydell
  2020-11-27  7:08     ` Gerd Hoffmann
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2020-11-26 18:05 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: Paolo Bonzini, Gerd Hoffmann, QEMU

On Thu, 26 Nov 2020 at 15:42, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Tue, Nov 24, 2020 at 4:30 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
>>
>> Add missing sanity check.
>> Reproducer: run qemu with "-device qxl" but without "-spice ..."
>>
>> Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>
>
> It would be nice to include this regression fix in the release. Anyone taking the patch to PR?


Looks like a safe fix and we do need to roll rc4 anyway, so if somebody wants
to send a pullreq tomorrow I can apply it.

thanks
-- PMM


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

* Re: [PATCH] qxl: fix segfault
  2020-11-26 18:05   ` Peter Maydell
@ 2020-11-27  7:08     ` Gerd Hoffmann
  0 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-11-27  7:08 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Paolo Bonzini, Marc-André Lureau, QEMU

  Hi,

> > It would be nice to include this regression fix in the release. Anyone taking the patch to PR?
> 
> Looks like a safe fix and we do need to roll rc4 anyway, so if somebody wants
> to send a pullreq tomorrow I can apply it.

I had one prepared already and was waiting for ci.

Sent now,
  Gerd



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

end of thread, other threads:[~2020-11-27  7:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 12:29 [PATCH] qxl: fix segfault Gerd Hoffmann
2020-11-24 12:44 ` Marc-André Lureau
2020-11-26 15:40 ` Marc-André Lureau
2020-11-26 18:05   ` Peter Maydell
2020-11-27  7:08     ` Gerd Hoffmann

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.