From: Samuel Thibault <samuel.thibault@gnu.org>
To: Brian Candler <b.candler@pobox.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] Crashing in tcp_close
Date: Sat, 12 Nov 2016 11:44:15 +0100 [thread overview]
Message-ID: <20161112104415.GR2417@var.home> (raw)
In-Reply-To: <07abcfd1-cff0-015d-90fb-f992b7328547@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
Hello,
Brian Candler, on Sat 12 Nov 2016 09:33:55 +0000, wrote:
> On 11/11/2016 22:09, Samuel Thibault wrote:
> >Ooh, I see. Now it's obvious, now that it's not coming from the tcb
> >loop:) Could you try the attached patch?
>
> It looks like it now goes into an infinite loop when a connection is closed.
Oops, sorry, my patch was completely bogus, here is a proper one.
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 707 bytes --]
diff --git a/slirp/socket.c b/slirp/socket.c
index 280050a..6c18971 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -66,6 +66,23 @@ void
sofree(struct socket *so)
{
Slirp *slirp = so->slirp;
+ struct mbuf *ifm;
+
+ for (ifm = (struct mbuf *) slirp->if_fastq.qh_link;
+ (struct quehead *) ifm != &slirp->if_fastq;
+ ifm = ifm->ifq_next) {
+ if (ifm->ifq_so == so) {
+ ifm->ifq_so = NULL;
+ }
+ }
+
+ for (ifm = (struct mbuf *) slirp->if_batchq.qh_link;
+ (struct quehead *) ifm != &slirp->if_batchq;
+ ifm = ifm->ifq_next) {
+ if (ifm->ifq_so == so) {
+ ifm->ifq_so = NULL;
+ }
+ }
if (so->so_emu==EMU_RSH && so->extra) {
sofree(so->extra);
next prev parent reply other threads:[~2016-11-12 10:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 21:53 [Qemu-devel] Crashing in tcp_close Brian Candler
2016-11-04 11:14 ` Stefan Hajnoczi
2016-11-06 18:04 ` Samuel Thibault
2016-11-07 8:42 ` Brian Candler
2016-11-07 9:33 ` Brian Candler
2016-11-07 10:42 ` Stefan Hajnoczi
2016-11-07 11:09 ` Brian Candler
2016-11-07 13:57 ` Stefan Hajnoczi
2016-11-07 20:52 ` Brian Candler
2016-11-08 16:03 ` Stefan Hajnoczi
2016-11-08 17:31 ` Brian Candler
2016-11-08 21:22 ` Brian Candler
2016-11-09 11:27 ` Stefan Hajnoczi
2016-11-11 15:02 ` Brian Candler
2016-11-11 16:02 ` Brian Candler
2016-11-11 16:17 ` Samuel Thibault
2016-11-11 20:53 ` Brian Candler
2016-11-11 22:09 ` Samuel Thibault
2016-11-12 9:33 ` Brian Candler
2016-11-12 9:54 ` Brian Candler
2016-11-12 10:44 ` Samuel Thibault [this message]
2016-11-13 11:55 ` Brian Candler
2016-11-14 13:47 ` Stefan Hajnoczi
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=20161112104415.GR2417@var.home \
--to=samuel.thibault@gnu.org \
--cc=b.candler@pobox.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.