* [PATCH] ui/console: remove console from global list on finalization
@ 2026-04-22 20:26 marcandre.lureau
2026-04-23 5:02 ` Markus Armbruster
2026-04-24 6:50 ` Markus Armbruster
0 siblings, 2 replies; 10+ messages in thread
From: marcandre.lureau @ 2026-04-22 20:26 UTC (permalink / raw)
To: qemu-devel; +Cc: armbru, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit removes the QemuConsole from the global "consoles" list when
it is finalized.
Previously, there was a TODO comment indicating this path needed
checking. The assertions added ensure that `dcls`, `gl_block`, and the
`dump_queue` are empty before removal, confirming the console is in a
clean state.
Fix potential use-after-free crashes when a display console is removed.
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/console.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui/console.c b/ui/console.c
index f445db11389..b64e2122f34 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
{
QemuConsole *c = QEMU_CONSOLE(obj);
- /* TODO: check this code path, and unregister from consoles */
+ assert(c->dcls == 0);
+ assert(c->gl_block == 0);
+ assert(qemu_co_queue_empty(&c->dump_queue));
g_clear_pointer(&c->surface, qemu_free_displaysurface);
g_clear_pointer(&c->gl_unblock_timer, timer_free);
g_clear_pointer(&c->ui_timer, timer_free);
+ QTAILQ_REMOVE(&consoles, c, next);
}
static void
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-22 20:26 [PATCH] ui/console: remove console from global list on finalization marcandre.lureau
@ 2026-04-23 5:02 ` Markus Armbruster
2026-04-23 6:28 ` Marc-André Lureau
2026-04-24 6:50 ` Markus Armbruster
1 sibling, 1 reply; 10+ messages in thread
From: Markus Armbruster @ 2026-04-23 5:02 UTC (permalink / raw)
To: marcandre.lureau; +Cc: qemu-devel
marcandre.lureau@redhat.com writes:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> This commit removes the QemuConsole from the global "consoles" list when
> it is finalized.
>
> Previously, there was a TODO comment indicating this path needed
> checking. The assertions added ensure that `dcls`, `gl_block`, and the
> `dump_queue` are empty before removal, confirming the console is in a
> clean state.
>
> Fix potential use-after-free crashes when a display console is removed.
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> ui/console.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/ui/console.c b/ui/console.c
> index f445db11389..b64e2122f34 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
> {
> QemuConsole *c = QEMU_CONSOLE(obj);
>
> - /* TODO: check this code path, and unregister from consoles */
> + assert(c->dcls == 0);
> + assert(c->gl_block == 0);
> + assert(qemu_co_queue_empty(&c->dump_queue));
Help me out: what ensures this?
> g_clear_pointer(&c->surface, qemu_free_displaysurface);
> g_clear_pointer(&c->gl_unblock_timer, timer_free);
> g_clear_pointer(&c->ui_timer, timer_free);
> + QTAILQ_REMOVE(&consoles, c, next);
Is @consoles only accessed from the main thread?
> }
>
> static void
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-23 5:02 ` Markus Armbruster
@ 2026-04-23 6:28 ` Marc-André Lureau
2026-04-23 6:59 ` Markus Armbruster
0 siblings, 1 reply; 10+ messages in thread
From: Marc-André Lureau @ 2026-04-23 6:28 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
Hi
On Thu, Apr 23, 2026 at 9:02 AM Markus Armbruster <armbru@redhat.com> wrote:
>
> marcandre.lureau@redhat.com writes:
>
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > This commit removes the QemuConsole from the global "consoles" list when
> > it is finalized.
> >
> > Previously, there was a TODO comment indicating this path needed
> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
> > `dump_queue` are empty before removal, confirming the console is in a
> > clean state.
> >
> > Fix potential use-after-free crashes when a display console is removed.
> >
> > Reported-by: Markus Armbruster <armbru@redhat.com>
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > ui/console.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/ui/console.c b/ui/console.c
> > index f445db11389..b64e2122f34 100644
> > --- a/ui/console.c
> > +++ b/ui/console.c
> > @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
> > {
> > QemuConsole *c = QEMU_CONSOLE(obj);
> >
> > - /* TODO: check this code path, and unregister from consoles */
> > + assert(c->dcls == 0);
> > + assert(c->gl_block == 0);
> > + assert(qemu_co_queue_empty(&c->dump_queue));
>
> Help me out: what ensures this?
- No display change listener left
- No GL lock left
- No pending screendump
>
> > g_clear_pointer(&c->surface, qemu_free_displaysurface);
> > g_clear_pointer(&c->gl_unblock_timer, timer_free);
> > g_clear_pointer(&c->ui_timer, timer_free);
> > + QTAILQ_REMOVE(&consoles, c, next);
>
> Is @consoles only accessed from the main thread?
Yes, the UI code is main thread only.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-23 6:28 ` Marc-André Lureau
@ 2026-04-23 6:59 ` Markus Armbruster
2026-04-23 8:02 ` Marc-André Lureau
0 siblings, 1 reply; 10+ messages in thread
From: Markus Armbruster @ 2026-04-23 6:59 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Thu, Apr 23, 2026 at 9:02 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> marcandre.lureau@redhat.com writes:
>>
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > This commit removes the QemuConsole from the global "consoles" list when
>> > it is finalized.
>> >
>> > Previously, there was a TODO comment indicating this path needed
>> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
>> > `dump_queue` are empty before removal, confirming the console is in a
>> > clean state.
>> >
>> > Fix potential use-after-free crashes when a display console is removed.
>> >
>> > Reported-by: Markus Armbruster <armbru@redhat.com>
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > ---
>> > ui/console.c | 5 ++++-
>> > 1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/ui/console.c b/ui/console.c
>> > index f445db11389..b64e2122f34 100644
>> > --- a/ui/console.c
>> > +++ b/ui/console.c
>> > @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
>> > {
>> > QemuConsole *c = QEMU_CONSOLE(obj);
>> >
>> > - /* TODO: check this code path, and unregister from consoles */
>> > + assert(c->dcls == 0);
>> > + assert(c->gl_block == 0);
>> > + assert(qemu_co_queue_empty(&c->dump_queue));
>>
>> Help me out: what ensures this?
>
> - No display change listener left
> - No GL lock left
> - No pending screendump
Yes, but what ensures none of these are left / pending by the time we
finalize?
>> > g_clear_pointer(&c->surface, qemu_free_displaysurface);
>> > g_clear_pointer(&c->gl_unblock_timer, timer_free);
>> > g_clear_pointer(&c->ui_timer, timer_free);
>> > + QTAILQ_REMOVE(&consoles, c, next);
>>
>> Is @consoles only accessed from the main thread?
>
> Yes, the UI code is main thread only.
Good, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-23 6:59 ` Markus Armbruster
@ 2026-04-23 8:02 ` Marc-André Lureau
2026-04-23 10:57 ` Markus Armbruster
0 siblings, 1 reply; 10+ messages in thread
From: Marc-André Lureau @ 2026-04-23 8:02 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
Hi
On Thu, Apr 23, 2026 at 10:59 AM Markus Armbruster <armbru@redhat.com> wrote:
>
> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>
> > Hi
> >
> > On Thu, Apr 23, 2026 at 9:02 AM Markus Armbruster <armbru@redhat.com> wrote:
> >>
> >> marcandre.lureau@redhat.com writes:
> >>
> >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> >
> >> > This commit removes the QemuConsole from the global "consoles" list when
> >> > it is finalized.
> >> >
> >> > Previously, there was a TODO comment indicating this path needed
> >> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
> >> > `dump_queue` are empty before removal, confirming the console is in a
> >> > clean state.
> >> >
> >> > Fix potential use-after-free crashes when a display console is removed.
> >> >
> >> > Reported-by: Markus Armbruster <armbru@redhat.com>
> >> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> > ---
> >> > ui/console.c | 5 ++++-
> >> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/ui/console.c b/ui/console.c
> >> > index f445db11389..b64e2122f34 100644
> >> > --- a/ui/console.c
> >> > +++ b/ui/console.c
> >> > @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
> >> > {
> >> > QemuConsole *c = QEMU_CONSOLE(obj);
> >> >
> >> > - /* TODO: check this code path, and unregister from consoles */
> >> > + assert(c->dcls == 0);
> >> > + assert(c->gl_block == 0);
> >> > + assert(qemu_co_queue_empty(&c->dump_queue));
> >>
> >> Help me out: what ensures this?
> >
> > - No display change listener left
> > - No GL lock left
> > - No pending screendump
>
> Yes, but what ensures none of these are left / pending by the time we
> finalize?
Unfortunately, we don't have much support for unplugging display
consoles. So those asserts are mostly there to remind us of further
issues.. I should probably leave the TODO.
In general graphics devices do not support hot-plugging. It looks like
we are missing a couple of hotpluggable = false in hw/display. So, it
should not be reachable today but by using low-level QMP/QOM like in
this test.
Text console/VC is also poorly supported and leaks, so it will never
reach qemu_console_finalize() either.
I can try to improve the situation by sending a more complete series,
so those assert() are unlikely to be reachable in the future.
>
> >> > g_clear_pointer(&c->surface, qemu_free_displaysurface);
> >> > g_clear_pointer(&c->gl_unblock_timer, timer_free);
> >> > g_clear_pointer(&c->ui_timer, timer_free);
> >> > + QTAILQ_REMOVE(&consoles, c, next);
> >>
> >> Is @consoles only accessed from the main thread?
> >
> > Yes, the UI code is main thread only.
>
> Good, thanks!
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-23 8:02 ` Marc-André Lureau
@ 2026-04-23 10:57 ` Markus Armbruster
2026-04-27 8:13 ` Marc-André Lureau
0 siblings, 1 reply; 10+ messages in thread
From: Markus Armbruster @ 2026-04-23 10:57 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Thu, Apr 23, 2026 at 10:59 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>>
>> > Hi
>> >
>> > On Thu, Apr 23, 2026 at 9:02 AM Markus Armbruster <armbru@redhat.com> wrote:
>> >>
>> >> marcandre.lureau@redhat.com writes:
>> >>
>> >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >> >
>> >> > This commit removes the QemuConsole from the global "consoles" list when
>> >> > it is finalized.
>> >> >
>> >> > Previously, there was a TODO comment indicating this path needed
>> >> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
>> >> > `dump_queue` are empty before removal, confirming the console is in a
>> >> > clean state.
>> >> >
>> >> > Fix potential use-after-free crashes when a display console is removed.
>> >> >
>> >> > Reported-by: Markus Armbruster <armbru@redhat.com>
>> >> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >> > ---
>> >> > ui/console.c | 5 ++++-
>> >> > 1 file changed, 4 insertions(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/ui/console.c b/ui/console.c
>> >> > index f445db11389..b64e2122f34 100644
>> >> > --- a/ui/console.c
>> >> > +++ b/ui/console.c
>> >> > @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
>> >> > {
>> >> > QemuConsole *c = QEMU_CONSOLE(obj);
>> >> >
>> >> > - /* TODO: check this code path, and unregister from consoles */
>> >> > + assert(c->dcls == 0);
>> >> > + assert(c->gl_block == 0);
>> >> > + assert(qemu_co_queue_empty(&c->dump_queue));
>> >>
>> >> Help me out: what ensures this?
>> >
>> > - No display change listener left
>> > - No GL lock left
>> > - No pending screendump
>>
>> Yes, but what ensures none of these are left / pending by the time we
>> finalize?
>
> Unfortunately, we don't have much support for unplugging display
> consoles. So those asserts are mostly there to remind us of further
> issues.. I should probably leave the TODO.
>
> In general graphics devices do not support hot-plugging. It looks like
> we are missing a couple of hotpluggable = false in hw/display.
I trust you'll take care of them.
> So, it
> should not be reachable today but by using low-level QMP/QOM like in
> this test.
Due to QOM's design, introspection must create and destroy a temporary
object. This must not have observable side effects.
Devices have a life cycle supporting this:
instance_init -+-> realize ---> unrealize -+-> instance_finalize.
| |
+---------------------------+
We can keep instance_init and instance_finalize free of side effects by
doing them in realize and unrealize instead.
Non-device objects lack realize / unrealize. I believe the wheel has
been reinvented a few times there.
Back to qemu_console_finalize(). I guess the correctness argument goes
roughly like this:
1. After initialization, these assertions hold.
2. Therefore, immediate finalize works. QOM introspection works.
3. Non-immediate finalization cannot happen.
Is this about right?
> Text console/VC is also poorly supported and leaks, so it will never
> reach qemu_console_finalize() either.
>
> I can try to improve the situation by sending a more complete series,
> so those assert() are unlikely to be reachable in the future.
I'm just trying to understand why this works :)
More complete patches are always nice, but I'm not demanding you do that
now. Comments perhaps?
>> >> > g_clear_pointer(&c->surface, qemu_free_displaysurface);
>> >> > g_clear_pointer(&c->gl_unblock_timer, timer_free);
>> >> > g_clear_pointer(&c->ui_timer, timer_free);
>> >> > + QTAILQ_REMOVE(&consoles, c, next);
>> >>
>> >> Is @consoles only accessed from the main thread?
>> >
>> > Yes, the UI code is main thread only.
>>
>> Good, thanks!
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-22 20:26 [PATCH] ui/console: remove console from global list on finalization marcandre.lureau
2026-04-23 5:02 ` Markus Armbruster
@ 2026-04-24 6:50 ` Markus Armbruster
2026-04-27 8:17 ` Marc-André Lureau
1 sibling, 1 reply; 10+ messages in thread
From: Markus Armbruster @ 2026-04-24 6:50 UTC (permalink / raw)
To: marcandre.lureau; +Cc: qemu-devel
marcandre.lureau@redhat.com writes:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> This commit removes the QemuConsole from the global "consoles" list when
> it is finalized.
>
> Previously, there was a TODO comment indicating this path needed
> checking. The assertions added ensure that `dcls`, `gl_block`, and the
> `dump_queue` are empty before removal, confirming the console is in a
> clean state.
>
> Fix potential use-after-free crashes when a display console is removed.
Suggest to mention reproducers: QMP command qom-list-properties with
typename "qemu-text-console", "qemu-fixed-text-console" or
"qemu-graphic-console".
> Reported-by: Markus Armbruster <armbru@redhat.com>
Please add
Cc: qemu-stable@nongnu.org
and Fixes: if it's not too much trouble.
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-23 10:57 ` Markus Armbruster
@ 2026-04-27 8:13 ` Marc-André Lureau
0 siblings, 0 replies; 10+ messages in thread
From: Marc-André Lureau @ 2026-04-27 8:13 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
Hi
On Thu, Apr 23, 2026 at 2:59 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>
> > Hi
> >
> > On Thu, Apr 23, 2026 at 10:59 AM Markus Armbruster <armbru@redhat.com> wrote:
> >>
> >> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> >>
> >> > Hi
> >> >
> >> > On Thu, Apr 23, 2026 at 9:02 AM Markus Armbruster <armbru@redhat.com> wrote:
> >> >>
> >> >> marcandre.lureau@redhat.com writes:
> >> >>
> >> >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> >> >
> >> >> > This commit removes the QemuConsole from the global "consoles" list when
> >> >> > it is finalized.
> >> >> >
> >> >> > Previously, there was a TODO comment indicating this path needed
> >> >> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
> >> >> > `dump_queue` are empty before removal, confirming the console is in a
> >> >> > clean state.
> >> >> >
> >> >> > Fix potential use-after-free crashes when a display console is removed.
> >> >> >
> >> >> > Reported-by: Markus Armbruster <armbru@redhat.com>
> >> >> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> >> > ---
> >> >> > ui/console.c | 5 ++++-
> >> >> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >> >> >
> >> >> > diff --git a/ui/console.c b/ui/console.c
> >> >> > index f445db11389..b64e2122f34 100644
> >> >> > --- a/ui/console.c
> >> >> > +++ b/ui/console.c
> >> >> > @@ -394,10 +394,13 @@ qemu_console_finalize(Object *obj)
> >> >> > {
> >> >> > QemuConsole *c = QEMU_CONSOLE(obj);
> >> >> >
> >> >> > - /* TODO: check this code path, and unregister from consoles */
> >> >> > + assert(c->dcls == 0);
> >> >> > + assert(c->gl_block == 0);
> >> >> > + assert(qemu_co_queue_empty(&c->dump_queue));
> >> >>
> >> >> Help me out: what ensures this?
> >> >
> >> > - No display change listener left
> >> > - No GL lock left
> >> > - No pending screendump
> >>
> >> Yes, but what ensures none of these are left / pending by the time we
> >> finalize?
> >
> > Unfortunately, we don't have much support for unplugging display
> > consoles. So those asserts are mostly there to remind us of further
> > issues.. I should probably leave the TODO.
> >
> > In general graphics devices do not support hot-plugging. It looks like
> > we are missing a couple of hotpluggable = false in hw/display.
>
> I trust you'll take care of them.
>
> > So, it
> > should not be reachable today but by using low-level QMP/QOM like in
> > this test.
>
> Due to QOM's design, introspection must create and destroy a temporary
> object. This must not have observable side effects.
>
> Devices have a life cycle supporting this:
>
> instance_init -+-> realize ---> unrealize -+-> instance_finalize.
> | |
> +---------------------------+
>
> We can keep instance_init and instance_finalize free of side effects by
> doing them in realize and unrealize instead.
>
> Non-device objects lack realize / unrealize. I believe the wheel has
> been reinvented a few times there.
>
> Back to qemu_console_finalize(). I guess the correctness argument goes
> roughly like this:
>
> 1. After initialization, these assertions hold.
>
> 2. Therefore, immediate finalize works. QOM introspection works.
>
> 3. Non-immediate finalization cannot happen.
>
> Is this about right?
I am confident it can happen on hot-unplug, but it's not working proprely.
>
> > Text console/VC is also poorly supported and leaks, so it will never
> > reach qemu_console_finalize() either.
> >
> > I can try to improve the situation by sending a more complete series,
> > so those assert() are unlikely to be reachable in the future.
>
> I'm just trying to understand why this works :)
>
> More complete patches are always nice, but I'm not demanding you do that
> now. Comments perhaps?
I think we should leave a TODO & asserts for the hot-unplug cases
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-24 6:50 ` Markus Armbruster
@ 2026-04-27 8:17 ` Marc-André Lureau
2026-04-27 9:20 ` Markus Armbruster
0 siblings, 1 reply; 10+ messages in thread
From: Marc-André Lureau @ 2026-04-27 8:17 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
Hi
On Fri, Apr 24, 2026 at 10:52 AM Markus Armbruster <armbru@redhat.com> wrote:
>
> marcandre.lureau@redhat.com writes:
>
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > This commit removes the QemuConsole from the global "consoles" list when
> > it is finalized.
> >
> > Previously, there was a TODO comment indicating this path needed
> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
> > `dump_queue` are empty before removal, confirming the console is in a
> > clean state.
> >
> > Fix potential use-after-free crashes when a display console is removed.
>
> Suggest to mention reproducers: QMP command qom-list-properties with
> typename "qemu-text-console", "qemu-fixed-text-console" or
> "qemu-graphic-console".
>
> > Reported-by: Markus Armbruster <armbru@redhat.com>
>
> Please add
>
> Cc: qemu-stable@nongnu.org
>
> and Fixes: if it's not too much trouble.
>
Given that the hot-unplug path is not tested and has probably not been
working correctly since forever, I don't think we should backport it
or look for Fixes commits.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ui/console: remove console from global list on finalization
2026-04-27 8:17 ` Marc-André Lureau
@ 2026-04-27 9:20 ` Markus Armbruster
0 siblings, 0 replies; 10+ messages in thread
From: Markus Armbruster @ 2026-04-27 9:20 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Fri, Apr 24, 2026 at 10:52 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> marcandre.lureau@redhat.com writes:
>>
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > This commit removes the QemuConsole from the global "consoles" list when
>> > it is finalized.
>> >
>> > Previously, there was a TODO comment indicating this path needed
>> > checking. The assertions added ensure that `dcls`, `gl_block`, and the
>> > `dump_queue` are empty before removal, confirming the console is in a
>> > clean state.
>> >
>> > Fix potential use-after-free crashes when a display console is removed.
>>
>> Suggest to mention reproducers: QMP command qom-list-properties with
>> typename "qemu-text-console", "qemu-fixed-text-console" or
>> "qemu-graphic-console".
>>
>> > Reported-by: Markus Armbruster <armbru@redhat.com>
>>
>> Please add
>>
>> Cc: qemu-stable@nongnu.org
>>
>> and Fixes: if it's not too much trouble.
>>
>
> Given that the hot-unplug path is not tested and has probably not been
> working correctly since forever, I don't think we should backport it
> or look for Fixes commits.
Hmm, makes sense. Add a suitable "careful, this is broken" comment?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-04-27 9:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 20:26 [PATCH] ui/console: remove console from global list on finalization marcandre.lureau
2026-04-23 5:02 ` Markus Armbruster
2026-04-23 6:28 ` Marc-André Lureau
2026-04-23 6:59 ` Markus Armbruster
2026-04-23 8:02 ` Marc-André Lureau
2026-04-23 10:57 ` Markus Armbruster
2026-04-27 8:13 ` Marc-André Lureau
2026-04-24 6:50 ` Markus Armbruster
2026-04-27 8:17 ` Marc-André Lureau
2026-04-27 9:20 ` Markus Armbruster
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.