From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQcWS-0004Ie-Ae for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQcWM-0007OT-AB for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:56:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQcWM-0007OC-1u for qemu-devel@nongnu.org; Thu, 20 Mar 2014 08:56:30 -0400 Date: Thu, 20 Mar 2014 12:56:21 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20140320125620.GB2754@work-vm> References: <1395253951-14524-1-git-send-email-dgilbert@redhat.com> <87bnx1gwwy.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bnx1gwwy.fsf@blackfin.pond.sub.org> 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: Markus Armbruster Cc: arei.gonglei@huawei.com, qemu-devel@nongnu.org, quintela@redhat.com * Markus Armbruster (armbru@redhat.com) wrote: > "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. I added the error reporting ones, because I ended up respinning my last patch after Paolo asked for them. Dave > > Reviewed-by: Markus Armbruster -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK