Re: [PATCH 1/2] qemu: Warn on possibly incorrect usage of EnterMonitor*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2019-11-07 at 14:18 +0100, Michal Privoznik wrote:
> The qemuDomainObjEnterMonitor() should not be called from without
> a job set. Catch this error and produce a warning message if such
> call occurred.

s/from//

Reviewed-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>


> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 667cc89072..4661deb027 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -8682,6 +8682,11 @@
> qemuDomainObjEnterMonitorInternal(virQEMUDriverPtr driver,
>      } else if (priv->job.asyncOwner == virThreadSelfID()) {
>          VIR_WARN("This thread seems to be the async job owner;
> entering"
>                   " monitor without asking for a nested job is
> dangerous");
> +    } else if (priv->job.owner != virThreadSelfID()) {
> +        VIR_WARN("Entering a monitor without owning a job. "
> +                 "Job %s owner %s (%llu)",
> +                 qemuDomainJobTypeToString(priv->job.active),
> +                 priv->job.ownerAPI, priv->job.owner);
>      }
>  
>      VIR_DEBUG("Entering monitor (mon=%p vm=%p name=%s)",

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux