From patchwork Tue Jul 19 11:46:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 105469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E202CB6F8A for ; Tue, 19 Jul 2011 22:19:55 +1000 (EST) Received: from localhost ([::1]:42081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj9HD-0006Jl-4B for incoming@patchwork.ozlabs.org; Tue, 19 Jul 2011 08:19:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj8tS-0001AE-Qm for qemu-devel@nongnu.org; Tue, 19 Jul 2011 07:55:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qj8tO-0001UN-Ae for qemu-devel@nongnu.org; Tue, 19 Jul 2011 07:55:18 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:48663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj8tN-0001UI-Tq for qemu-devel@nongnu.org; Tue, 19 Jul 2011 07:55:14 -0400 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 62C7EA1A6B; Tue, 19 Jul 2011 15:55:12 +0400 (MSD) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 609C553E5; Tue, 19 Jul 2011 15:55:11 +0400 (MSD) From: Michael Tokarev Date: Tue, 19 Jul 2011 15:46:39 +0400 To: qemu-devel@nongnu.org Message-Id: <20110719115511.609C553E5@gandalf.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 86.62.121.231 Cc: Michael Tokarev , Marcelo Tosatti , Jan Kiszka Subject: [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If we do, it results in double monitor_resume() (second being called from migrate_fd_cleanup() anyway) and monitor suspend count becoming negative. Cc'ing people from `git blame' list for the lines in question: the change fixes the problem but I'm not sure what the original intention of this code was in this place. Unfortunately noone replied to two my attempts to raise this issue. Signed-Off-By: Michael Tokarev Reviewed-by: Jan Kiszka --- migration.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index af3a1f2..115588c 100644 --- a/migration.c +++ b/migration.c @@ -330,9 +330,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) if (ret == -EAGAIN) { qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s); } else if (ret < 0) { - if (s->mon) { - monitor_resume(s->mon); - } s->state = MIG_STATE_ERROR; notifier_list_notify(&migration_state_notifiers); }