From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] vnc: threaded server depends on io-thread Date: Wed, 09 Mar 2011 12:25:50 +0100 Message-ID: <4D7763BE.7070002@web.de> References: <4D77539E.8090509@web.de> <1299667284-15157-1-git-send-email-corentin.chary@gmail.com> <34D09CB3-4BD5-4FF5-B65C-11932CE54503@dlh.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE59D6D7741AB7E8E4F036862" Cc: Corentin Chary , Peter Lieven , qemu-devel , kvm@vger.kernel.org, Anthony Liguori To: Stefan Hajnoczi Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:59947 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753486Ab1CILZ4 (ORCPT ); Wed, 9 Mar 2011 06:25:56 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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--