mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
ebd004299a
commit
1faf74050f
@ -8719,6 +8719,11 @@ qemuDomainObjEnterMonitorInternal(virQEMUDriverPtr driver,
|
|||||||
} else if (priv->job.asyncOwner == virThreadSelfID()) {
|
} else if (priv->job.asyncOwner == virThreadSelfID()) {
|
||||||
VIR_WARN("This thread seems to be the async job owner; entering"
|
VIR_WARN("This thread seems to be the async job owner; entering"
|
||||||
" monitor without asking for a nested job is dangerous");
|
" 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)",
|
VIR_DEBUG("Entering monitor (mon=%p vm=%p name=%s)",
|
||||||
|
Loading…
Reference in New Issue
Block a user