libxl: Re-scope qmp_proxy_spawn.ao usage
authorJason Andryuk <jandryuk@gmail.com>
Wed, 6 Apr 2022 08:19:57 +0000 (10:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 6 Apr 2022 08:19:57 +0000 (10:19 +0200)
commit72a5bde6912198fb2d26ef94ae9cb7ed2bb6bb43
tree99ac0d2b361630db978df94a9b8e95ed64cb85c3
parentc3cf5d0f3d173b59e09642e278f53820a52f3cef
libxl: Re-scope qmp_proxy_spawn.ao usage

I've observed this failed assertion:
libxl_event.c:2057: libxl__ao_inprogress_gc: Assertion `ao' failed.

AFAICT, this is happening in qmp_proxy_spawn_outcome where
sdss->qmp_proxy_spawn.ao is NULL.

The out label of spawn_stub_launch_dm() calls qmp_proxy_spawn_outcome(),
but it is only in the success path that sdss->qmp_proxy_spawn.ao gets
set to the current ao.

qmp_proxy_spawn_outcome() should instead use sdss->dm.spawn.ao, which is
the already in-use ao when spawn_stub_launch_dm() is called.  The same
is true for spawn_qmp_proxy().

With this, move sdss->qmp_proxy_spawn.ao initialization to
spawn_qmp_proxy() since its use is for libxl__spawn_spawn() and it can
be initialized along with the rest of sdss->qmp_proxy_spawn.

Fixes: 83c845033dc8 ("libxl: use vchan for QMP access with Linux stubdomain")
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
master commit: d62a34423a1a98aefd7c30e22d2d82d198f077c8
master date: 2022-04-01 17:01:57 +0100
tools/libs/light/libxl_dm.c