qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: do not report queued packets as sent
Date: Wed, 29 Aug 2012 16:36:39 +0100	[thread overview]
Message-ID: <20120829153639.GD26167@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1345468960-15558-1-git-send-email-stefanha@linux.vnet.ibm.com>

On Mon, Aug 20, 2012 at 02:22:40PM +0100, Stefan Hajnoczi wrote:
> Net send functions have a return value where 0 means the packet has not
> been sent and will be queued.  A non-zero value means the packet was
> sent or an error caused the packet to be dropped.
> 
> This patch fixes two instances where packets are queued but we return
> their size.  This causes callers to believe the packets were sent.  When
> the caller uses the async send interface this creates a real problem
> because the callback will be invoked for a packet that the caller
> believed to be already sent.  This bug can cause double-frees in the
> caller.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
>  net/queue.c |   35 ++++++++++++++++-------------------
>  1 file changed, 16 insertions(+), 19 deletions(-)

Applied to the net tree:
https://github.com/stefanha/qemu/commits/net

Stefan

      reply	other threads:[~2012-08-29 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 13:22 [Qemu-devel] [PATCH] net: do not report queued packets as sent Stefan Hajnoczi
2012-08-29 15:36 ` Stefan Hajnoczi [this message]

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=20120829153639.GD26167@stefanha-thinkpad.localdomain \
    --to=stefanha@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.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 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).