netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: <netdev@vger.kernel.org>
Cc: <xen-devel@lists.xen.org>, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH v2 4/4] netback: correct netbk_tx_err to handle wrap around.
Date: Thu, 7 Feb 2013 09:41:38 +0000	[thread overview]
Message-ID: <1360230098-28218-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1360230078.32479.41.camel@zakaz.uk.xensource.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Cc: <stable@vger.kernel.org> # 3.0+
---
 drivers/net/xen-netback/netback.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index dcb2d4d..2b9520c 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -880,7 +880,7 @@ static void netbk_tx_err(struct xenvif *vif,
 
 	do {
 		make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
-		if (cons >= end)
+		if (cons == end)
 			break;
 		txp = RING_GET_REQUEST(&vif->tx, cons++);
 	} while (1);
-- 
1.7.2.5

  parent reply	other threads:[~2013-02-07  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  9:41 [PATCH v2 0/4] XSA-39 CVE-2013-021[67]: Linux netback DoS via malicious guest ring Ian Campbell
2013-02-07  9:41 ` [PATCH v2 1/4] xen/netback: shutdown the ring if it contains garbage Ian Campbell
2013-02-07  9:41 ` [PATCH v2 2/4] xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop Ian Campbell
2013-02-07  9:41 ` [PATCH v2 3/4] xen/netback: free already allocated memory on failure in xen_netbk_get_requests Ian Campbell
2013-02-07  9:41 ` Ian Campbell [this message]
2013-02-08  4:31 ` [PATCH v2 0/4] XSA-39 CVE-2013-021[67]: Linux netback DoS via malicious guest ring David Miller
2013-02-08  7:54   ` Ian Campbell

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=1360230098-28218-4-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=xen-devel@lists.xen.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).