From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40253 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxJer-00017V-37 for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:42:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxJep-00067d-PY for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:42:32 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:50136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxJep-00067M-LD for qemu-devel@nongnu.org; Wed, 09 Mar 2011 08:42:31 -0500 Received: by ewy24 with SMTP id 24so165697ewy.4 for ; Wed, 09 Mar 2011 05:42:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1299676892-19246-1-git-send-email-corentin.chary@gmail.com> References: <4D7767C0.6060609@siemens.com> <1299676892-19246-1-git-send-email-corentin.chary@gmail.com> Date: Wed, 9 Mar 2011 13:42:29 +0000 Message-ID: From: Corentin Chary Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: [PATCH v2] vnc: threaded server depends on io-thread List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: kvm@vger.kernel.org, Peter Lieven , qemu-devel , Anthony Liguori , Jan Kiszka , Corentin Chary On Wed, Mar 9, 2011 at 1:21 PM, 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. > > Thanks to Jan Kiszka for helping me solve this issue. > > Cc: Jan Kiszka > Signed-off-by: Corentin Chary > --- > The previous patch was total crap, introduced race conditions, > and probably crashs on client disconnections. Forget that one too, also deadlock on vnc_jobs_join(). I'll need some more time to fix that. -- Corentin Chary http://xf.iksaif.net