Received: from eggs.gnu.org ([2001:4830:134:3::10]:48069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQcU7-00015x-9Q for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:54:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQcU1-0006go-9Y for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:54:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQcU1-0006fq-22 for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:54:05 -0400 From: Markus Armbruster References: <1395253951-14524-1-git-send-email-dgilbert@redhat.com> Date: Thu, 20 Mar 2014 08:18:53 +0100 In-Reply-To: <1395253951-14524-1-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Wed, 19 Mar 2014 18:32:29 +0000") Message-ID: <87bnx1gwwy.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 0/2] Stop reinit of XBZRLE.lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: arei.gonglei@huawei.com, qemu-devel@nongnu.org, quintela@redhat.com "Dr. David Alan Gilbert (git)" writes: > 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 Second patch does a fair but more than its subject suggests. Perhaps "XBZRLE: Rework locking to fix double initialization" would be better. Still doesn't cover the upgrade from debugging prints to proper error reporting. Maybe that should be a separate patch. Up to you. Reviewed-by: Markus Armbruster