]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't take agent and monitor job for shutdown
authorJonathon Jongsma <jjongsma@redhat.com>
Thu, 5 Dec 2019 16:08:50 +0000 (10:08 -0600)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Dec 2019 14:43:58 +0000 (15:43 +0100)
commit1cb8bc52c1035573a0c1a87f724a6c7dfee82f12
treeb1a69d43e2eb12f1607df2ac9dc52fd180f4a585
parentcae955eba273fc12eed645a33b7dd4b4bd586b51
qemu: don't take agent and monitor job for shutdown

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 into separate parts: one that does the agent
shutdown and one that does the monitor shutdown. Each part holds only a
job of the appropriate type.

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