]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't hold both jobs for suspend
authorJonathon Jongsma <jjongsma@redhat.com>
Thu, 5 Dec 2019 16:08:52 +0000 (10:08 -0600)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Dec 2019 14:43:58 +0000 (15:43 +0100)
commita663a860819287e041c3de672aad1d8543098ecc
tree498c4cc7e88d1f3bc097f483fa30b626fa661d7b
parent0a9893121187c0c3f9807e9164366e1f6977619c
qemu: don't hold both jobs for suspend

We have to assume that the guest agent may be malicious so we don't want
to allow any agent queries to block any other libvirt API. By holding a
monitor job while we're querying the agent, we open ourselves up to a
DoS.

So split the function up a bit to only hold the monitor job while
querying qemu for whether the domain supports suspend. Then acquire only
an agent job while issuing the agent suspend command.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c