]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: agent: take monitor lock in qemuAgentNotifyEvent
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Mon, 12 Dec 2016 09:13:44 +0000 (12:13 +0300)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 12 Dec 2016 22:14:11 +0000 (17:14 -0500)
commitcdd6819318ac75fbcb24ef7a8d1e6e4643c649eb
tree3a95a733a3243af67a7002eacd06734eba4ab8d3
parentc9a191fc481a950edc72afcb6ea9556edbaebb23
qemu: agent: take monitor lock in qemuAgentNotifyEvent

qemuAgentNotifyEvent accesses monitor structure and is called on qemu
reset/shutdown/suspend events under domain lock. Other monitor
functions on the other hand take monitor lock and don't hold domain lock.
Thus it is possible to have risky simultaneous access to the structure
from 2 threads. Let's take monitor lock here to make access exclusive.
src/qemu/qemu_agent.c