提交 1faf7405 编写于 作者: M Michal Privoznik

qemu: Warn on possibly incorrect usage of EnterMonitor*

The qemuDomainObjEnterMonitor() should not be called without a
job set. Catch this error and produce a warning message if such
call occurred.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJonathon Jongsma <jjongsma@redhat.com>
上级 ebd00429
......@@ -8719,6 +8719,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)",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册