From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzVVa-0000KU-D2 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:18:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzVVZ-0005yJ-Fg for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:18:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzVVZ-0005yC-6s for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:18:17 -0400 Message-ID: <4E60F3B2.6000904@redhat.com> Date: Fri, 02 Sep 2011 17:18:10 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <20110901163545.71ba1515@doriath> <4E6032AB.8080804@codemonkey.ws> <4E60DC77.5020300@redhat.com> <4E60E813.9000302@codemonkey.ws> In-Reply-To: <4E60E813.9000302@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Marian Krcmarik , Alon Levy , qemu-devel , spice-devel , Luiz Capitulino Hi, >> A patch like the attached (warning: untested) should do as quick&dirty >> fix for stable. But IMO we really should fix spice instead. > > I agree. I'm not sure I like the idea of still calling QEMU code without > holding the mutex (even the QObject code). I though just creating the objects isn't an issue, but if you disagree we can just move up the lock to the head of the function. > Can you just use a bottom half to defer this work to the I/O thread? > Bottom half scheduling has to be signal safe which means it will also be > thread safe. Not that straight forward as I would have to pass arguments to the bottom half. cheers, Gerd