From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDDGI-0005X2-Fk for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDDGE-0002oD-CU for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:57:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDDGE-0002o7-7P for qemu-devel@nongnu.org; Thu, 09 Jul 2015 10:57:14 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 9F290A91 for ; Thu, 9 Jul 2015 14:57:13 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t69EvA2d023353 for ; Thu, 9 Jul 2015 10:57:12 -0400 From: Paolo Bonzini Date: Thu, 9 Jul 2015 16:57:09 +0200 Message-Id: <1436453830-4700-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1436453830-4700-1-git-send-email-pbonzini@redhat.com> References: <1436453830-4700-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 1/2] migration: fix RCU deadlock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org migration_end calls synchronize_rcu() within a critical section. That causes a deadlock; move the call after rcu_read_unlock(). Signed-off-by: Paolo Bonzini --- migration/ram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index c696814..1e58cd3 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1266,9 +1266,10 @@ static int ram_save_complete(QEMUFile *f, void *opaque) flush_compressed_data(f); ram_control_after_iterate(f, RAM_CONTROL_FINISH); - migration_end(); rcu_read_unlock(); + + migration_end(); qemu_put_be64(f, RAM_SAVE_FLAG_EOS); return 0; -- 2.4.3