Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjbVe-0001rw-QZ for qemu-devel@nongnu.org; Mon, 22 Feb 2010 11:51:50 -0500 Received: from [199.232.76.173] (port=56726 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjbVe-0001rK-7E for qemu-devel@nongnu.org; Mon, 22 Feb 2010 11:51:50 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NjbVc-0003t2-IJ for qemu-devel@nongnu.org; Mon, 22 Feb 2010 11:51:49 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:50269) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NjbVc-0003sU-3h for qemu-devel@nongnu.org; Mon, 22 Feb 2010 11:51:48 -0500 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e35.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o1MGlgxm000598 for ; Mon, 22 Feb 2010 09:47:42 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1MGpMi7151040 for ; Mon, 22 Feb 2010 09:51:22 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o1MGpLGX021912 for ; Mon, 22 Feb 2010 09:51:22 -0700 Subject: Re: [Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command From: Adam Litke In-Reply-To: <4B7F070A.9010100@codemonkey.ws> References: <1266008156.3474.18.camel@aglitke> <4B7F070A.9010100@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Date: Mon, 22 Feb 2010 10:51:20 -0600 Message-ID: <1266857480.3174.10.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Fri, 2010-02-19 at 15:47 -0600, Anthony Liguori wrote: > On 02/12/2010 02:55 PM, Adam Litke wrote: > > Arghh... Adding missing S-O-B > > > > Hi Anthony. I wonder if there was a problem when importing my async > > command handler patchset. Since the 'balloon' command completes > > immediately, it must call the completion callback before returning. > > That call was missing but is added by the patch below. > > > > Signed-off-by: Adam Litke > > > > Applied. Thanks. 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 diff --git a/monitor.c b/monitor.c index b1a6edc..c7d2117 100644 --- a/monitor.c +++ b/monitor.c @@ -2309,7 +2309,6 @@ static int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque) return -1; } - cb(opaque, NULL); return 0; } @@ -2332,6 +2331,7 @@ static int do_balloon(Monitor *mon, const QDict *params, return -1; } + cb(opaque, NULL); return 0; } -- Thanks, Adam