From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQLIA-0006gL-Ua for qemu-devel@nongnu.org; Wed, 19 Mar 2014 14:32:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQLI4-0003SP-Ve for qemu-devel@nongnu.org; Wed, 19 Mar 2014 14:32:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQLI4-0003SB-Od for qemu-devel@nongnu.org; Wed, 19 Mar 2014 14:32:36 -0400 From: "Dr. David Alan Gilbert (git)" Date: Wed, 19 Mar 2014 18:32:29 +0000 Message-Id: <1395253951-14524-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/2] Stop reinit of XBZRLE.lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: arei.gonglei@huawei.com, armbru@redhat.com, quintela@redhat.com From: "Dr. David Alan Gilbert" Markus Armbruster spotted that the XBZRLE.lock might get initalised multiple times in the case of a second attempted migration, and that's undefined behaviour for pthread_mutex_init. This patchset is based on Markus' proto-patch in the discussions off v1. -- v2 Rework completely based on Markus's patch Dr. David Alan Gilbert (2): Provide init function for ram migration Init the XBZRLE.lock in ram_mig_init arch_init.c | 68 +++++++++++++++++++++++-------------------- include/migration/migration.h | 2 -- include/sysemu/arch_init.h | 1 + vl.c | 3 +- 4 files changed, 39 insertions(+), 35 deletions(-) -- 1.8.5.3