Fix race condition when destroying guests
When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain object while in the middle of work, because the monitor might detect EOF in this window. For this reason we have a 'beingDestroyed' flag to stop the monitor from doing its normal cleanup. Unfortunately this flag was only being used to protect qemuDomainBeginJob, and not qemuProcessKill This left open a race condition where either libvirtd could crash, or alternatively report bogus error messages about the domain already having been destroyed to the caller Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 81621f3e) Conflicts: src/qemu/qemu_driver.c - virReportError had been removed from upstream in cases where qemuProcessKill failed, creating different context.
Showing
想要评论请 注册 或 登录