OSDN Git Service

Fix hanging user monitor when using balloon command
authorAdam Litke <agl@us.ibm.com>
Mon, 22 Feb 2010 16:51:20 +0000 (10:51 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 8 Mar 2010 17:29:17 +0000 (11:29 -0600)
This patch application failed.  My patch adds a cb() call in
do_balloon(), but the change in git has added the cb() call to
do_info_balloon().  That is causing qemu segfaults.  Applying the
following should correct the damage.  Thanks.

Fix for commit: 5c366a8a3d7ac71beda8499caa815cb3ea95eb58

The cb() call is needed in do_balloon(), not do_info_balloon().

Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c

index 19470d1..61a072b 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -2307,7 +2307,6 @@ static int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque)
         return -1;
     }
 
-    cb(opaque, NULL);
     return 0;
 }
 
@@ -2330,6 +2329,7 @@ static int do_balloon(Monitor *mon, const QDict *params,
         return -1;
     }
 
+    cb(opaque, NULL);
     return 0;
 }