From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl6la-0001QI-1o for qemu-devel@nongnu.org; Fri, 26 Feb 2010 15:26:30 -0500 Received: from [199.232.76.173] (port=51895 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl6lZ-0001Q8-Du for qemu-devel@nongnu.org; Fri, 26 Feb 2010 15:26:29 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nl6lX-0003pT-VL for qemu-devel@nongnu.org; Fri, 26 Feb 2010 15:26:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl6lX-0003pF-Fv for qemu-devel@nongnu.org; Fri, 26 Feb 2010 15:26:27 -0500 Date: Fri, 26 Feb 2010 17:26:17 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH] Fix hanging user monitor when using balloon command Message-ID: <20100226172617.7e037e1e@redhat.com> In-Reply-To: <1266857480.3174.10.camel@aglitke> References: <1266008156.3474.18.camel@aglitke> <4B7F070A.9010100@codemonkey.ws> <1266857480.3174.10.camel@aglitke> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Adam Litke Cc: qemu-devel@nongnu.org On Mon, 22 Feb 2010 10:51:20 -0600 Adam Litke wrote: > 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(). It won't segfault on QMP, but will print a duplicated response on query-balloon and no success response on balloon. This patch fixes both. One question, though: > @@ -2332,6 +2331,7 @@ static int do_balloon(Monitor *mon, const QDict *params, > return -1; > } > > + cb(opaque, NULL); > return 0; > } Can't (or shouldn't) this be called by common code upon handler completion?