From patchwork Mon Feb 22 16:51:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Litke X-Patchwork-Id: 45973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2FBD2B7CD5 for ; Tue, 23 Feb 2010 03:53:32 +1100 (EST) Received: from localhost ([127.0.0.1]:59872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjbXF-0002U7-1v for incoming@patchwork.ozlabs.org; Mon, 22 Feb 2010 11:53:29 -0500 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 Received: from [9.65.236.29] (sig-9-65-236-29.mts.ibm.com [9.65.236.29]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o1MGpKxL021807; Mon, 22 Feb 2010 09:51:21 -0700 Subject: Re: [Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command From: Adam Litke To: Anthony Liguori In-Reply-To: <4B7F070A.9010100@codemonkey.ws> References: <1266008156.3474.18.camel@aglitke> <4B7F070A.9010100@codemonkey.ws> Organization: IBM Date: Mon, 22 Feb 2010 10:51:20 -0600 Message-ID: <1266857480.3174.10.camel@aglitke> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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; }