|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access |
Date: | Fri, 02 Sep 2011 17:18:10 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Red Hat/3.1.12-1.el6_1 Thunderbird/3.1.12 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |