]> git.ipfire.org Git - thirdparty/libvirt.git/commit
enhance processWatchdogEvent()
authorWen Congyang <wency@cn.fujitsu.com>
Fri, 15 Apr 2011 03:11:39 +0000 (11:11 +0800)
committerWen Congyang <wency@cn.fujitsu.com>
Mon, 18 Apr 2011 01:38:45 +0000 (09:38 +0800)
commitb060d2e5d44eac464cbe6a74edbe872636a94abe
treec63d6360c7b3859eb64ab463fc128c8f864bf9dd
parent847efb32de3467801924cc901d2cf80e9d7c48de
enhance processWatchdogEvent()

This patch does the following two things:
1. hold an extra reference while handling watchdog event
   If the domain is not persistent, and qemu quits unexpectedly before
   calling processWatchdogEvent(), vm will be freed and the function
   processWatchdogEvent() will be dangerous.

2. unlock qemu driver and vm before returning from processWatchdogEvent()
   When the function processWatchdogEvent() failed, we only free wdEvent,
   but forget to unlock qemu driver and vm, free dumpfile.
src/qemu/qemu_driver.c
src/qemu/qemu_process.c