From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marian Krcmarik <mkrcmari@redhat.com>,
Alon Levy <alevy@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
spice-devel <spice-devel@freedesktop.org>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access
Date: Fri, 02 Sep 2011 10:20:51 -0500 [thread overview]
Message-ID: <4E60F453.1090703@codemonkey.ws> (raw)
In-Reply-To: <4E60F3B2.6000904@redhat.com>
On 09/02/2011 10:18 AM, Gerd Hoffmann wrote:
> 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.
What I fear is that Spice will assume something is thread safe, but then
someone will make a change that makes the subsystem non-reentrant.
I'd rather that we have very clear rules about what's thread safe and
not thread safe. If you want to audit the QObject subsystem, declare it
thread safe, and document it as such, that would be okay. But it needs
to be systematic, not ad-hoc.
Regards,
Anthony Liguori
>
>> 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
>
>
next prev parent reply other threads:[~2011-09-02 15:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 19:35 [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access Luiz Capitulino
2011-09-01 19:47 ` Daniel P. Berrange
2011-09-01 21:03 ` Jan Kiszka
2011-09-02 1:34 ` Anthony Liguori
2011-09-02 9:41 ` Daniel P. Berrange
2011-09-02 11:26 ` Jan Kiszka
2011-09-02 13:39 ` Gerd Hoffmann
2011-09-02 14:03 ` Anthony Liguori
2011-09-02 14:24 ` Luiz Capitulino
2011-09-02 14:28 ` Anthony Liguori
2011-09-02 15:18 ` Gerd Hoffmann
2011-09-02 15:20 ` Anthony Liguori [this message]
2011-09-02 15:31 ` Paolo Bonzini
2011-09-02 15:37 ` Anthony Liguori
2011-09-05 7:48 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E60F453.1090703@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alevy@redhat.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mkrcmari@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=spice-devel@freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).