From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Make removing IOHandlers safe from within an IOHandler
Date: Sat, 24 Feb 2007 18:39:14 +0000 [thread overview]
Message-ID: <20070224183914.GA15380@redhat.com> (raw)
In-Reply-To: <45E07BC9.1080209@codemonkey.ws>
On Sat, Feb 24, 2007 at 11:54:17AM -0600, Anthony Liguori wrote:
> I was getting random SEGVs when disconnecting from the VNC server. I
> tracked it down to the fact that if you remove a IOHandler from another
> IOHandler, all sorts of badness may result as you're removing entries
> from a linked list while transversing it.
>
> My solution is to simply add a deleted flag to each entry and walk the
> list a second time. During the second transversal, we'll remove nodes
> that need removing.
>
> Haven't seen the SEGV since I started using this patch.
That's pretty much identical solution to the one I just posted along with
the patches for VNC TLS support, so I can also confirm this approach works
& solves the SEGV issue.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
next prev parent reply other threads:[~2007-02-24 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-24 17:54 [Qemu-devel] [PATCH] Make removing IOHandlers safe from within an IOHandler Anthony Liguori
2007-02-24 18:39 ` Daniel P. Berrange [this message]
2007-02-24 19:09 ` [Qemu-devel] [PATCH][UPDATE] " Anthony Liguori
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=20070224183914.GA15380@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.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).