
28 Feb
2018
28 Feb
'18
4:43 a.m.
On Thu, Mar 01, 2018 at 01:09:40 +0800, Peng Hao wrote:
From: root <root@localhost.localdomain>
qemuDomainObjExitMonitor is unsafe
domain lock released when qemuDomainObjEnterMonitor finish, So other thread (qemuProcessStop) has chance to modify priv->mon to NULL. qemuDomainObjExitMonitor will never release the mon->lock,
that may cause problem: thread get monitor ptr early, and then try to get mon->lock, it will block forerver cause mon->lock not released by qemuDomainObjExitMonitor.
Could you please provide a reproducer for this? The call to qemuProcessStop should be guarded by a domain job, which should guarantee that priv->mon is unset only after the currently processed monitor call exits properly.