]> xenbits.xensource.com Git - libvirt.git/commit
qemu: don't hold monitor and agent job when setting time
authorJonathon Jongsma <jjongsma@redhat.com>
Thu, 5 Dec 2019 16:08:53 +0000 (10:08 -0600)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Dec 2019 14:43:58 +0000 (15:43 +0100)
commite005c95f56fee9ed780be7f8db103d690bd34cbd
tree4a2c7b20b2f55dc8b67aefe6cba4b57d7b926456
parenta663a860819287e041c3de672aad1d8543098ecc
qemu: don't hold monitor and agent job when setting time

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.

Split the function so that the portion issuing the agent command only
holds an agent job and the portion issuing the monitor command holds
only a monitor job.

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