From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxHWh-0006qP-NZ for qemu-devel@nongnu.org; Wed, 09 Mar 2011 06:26:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxHWf-0004K3-1e for qemu-devel@nongnu.org; Wed, 09 Mar 2011 06:25:59 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:59942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxHWe-0004Jf-Hk for qemu-devel@nongnu.org; Wed, 09 Mar 2011 06:25:56 -0500 Message-ID: <4D7763BE.7070002@web.de> Date: Wed, 09 Mar 2011 12:25:50 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4D77539E.8090509@web.de> <1299667284-15157-1-git-send-email-corentin.chary@gmail.com> <34D09CB3-4BD5-4FF5-B65C-11932CE54503@dlh.net> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE59D6D7741AB7E8E4F036862" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] vnc: threaded server depends on io-thread List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Peter Lieven , Anthony Liguori , qemu-devel , Corentin Chary , kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE59D6D7741AB7E8E4F036862 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-09 12:05, Stefan Hajnoczi wrote: > On Wed, Mar 9, 2011 at 10:57 AM, Corentin Chary > wrote: >>>> The threaded VNC servers messed up with QEMU fd handlers without >>>> any kind of locking, and that can cause some nasty race conditions. >>>> >>>> The IO-Thread provides appropriate locking primitives to avoid that.= >>>> This patch makes CONFIG_VNC_THREAD depends on CONFIG_IO_THREAD, >>>> and add lock and unlock calls around the two faulty calls. >>> >>> qemu-kvm currently doesn't compile with --enable-io-thread. is there = an easy fix >>> for this? >> >> If IO Thread is not available, I'm afraid that --disable-vnc-thread is= >> the only fix. >> Or, you can try to define some global mutex acting like iothread >> locks, but that doesn't sounds like an easy fix. >=20 > Jan or Marcelo can help here but qemu-kvm has an iothread equivalent > built in by default. It should be possible to use that. qemu_mutex_lock/unlock_iothread is properly provided in qemu-kvm even without --enable-io-thread. So that tree could temporarily disable the new configure check until we got rid of the special qemu-kvm bits. Corentin's patch is against upstream, that adjustment need to be made once the commit is merged into qemu-kvm. Jan --------------enigE59D6D7741AB7E8E4F036862 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk13Y8EACgkQitSsb3rl5xQ+5ACg7lGqY8CMj7fDD/wq8ed0lgvz lAEAoKMnYcJHlU8GI+2YgVOssCI06gsa =FKWK -----END PGP SIGNATURE----- --------------enigE59D6D7741AB7E8E4F036862--