[libvirt] [PATCH 2/8] qemu: don't hold a monitor and agent job for reboot
Michal Privoznik
mprivozn at redhat.com
Thu Dec 12 14:47:22 UTC 2019
On 12/5/19 5:08 PM, Jonathon Jongsma wrote:
> 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 we only hold the appropriate type of job
> while rebooting.
>
> Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
> ---
> src/qemu/qemu_driver.c | 111 +++++++++++++++++++++++++----------------
> 1 file changed, 68 insertions(+), 43 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 92efde72dd..edd36f4a89 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2097,56 +2157,21 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
> + if (ret < 0 && agentForced)
> + goto cleanup;
Ooops, misaligned.
Michal
More information about the libvir-list
mailing list