From: David Vrabel <david.vrabel@citrix.com>
To: <netdev@vger.kernel.org>
Cc: xen-devel@lists.xenproject.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
David Vrabel <david.vrabel@citrix.com>
Subject: [PATCH 1/2] xen-netfront: fix oops when disconnected from backend
Date: Wed, 18 Jun 2014 10:47:27 +0100 [thread overview]
Message-ID: <1403084848-12872-2-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1403084848-12872-1-git-send-email-david.vrabel@citrix.com>
xennet_disconnect_backend() was not correctly iterating over all the
queues.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
drivers/net/xen-netfront.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 5a7872a..daaf1e5 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1287,7 +1287,7 @@ static irqreturn_t xennet_rx_interrupt(int irq, void *dev_id)
if (likely(netif_carrier_ok(dev) &&
RING_HAS_UNCONSUMED_RESPONSES(&queue->rx)))
- napi_schedule(&queue->napi);
+ napi_schedule(&queue->napi);
return IRQ_HANDLED;
}
@@ -1437,10 +1437,11 @@ static void xennet_end_access(int ref, void *page)
static void xennet_disconnect_backend(struct netfront_info *info)
{
unsigned int i = 0;
- struct netfront_queue *queue = NULL;
unsigned int num_queues = info->netdev->real_num_tx_queues;
for (i = 0; i < num_queues; ++i) {
+ struct netfront_queue *queue = &info->queues[i];
+
/* Stop old i/f to prevent errors whilst we rebuild the state. */
spin_lock_bh(&queue->rx_lock);
spin_lock_irq(&queue->tx_lock);
--
1.7.10.4
next prev parent reply other threads:[~2014-06-18 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 9:47 [PATCHv1 0/2 net] xen-netfront: fix resume regressions in 3.16-rc1 David Vrabel
2014-06-18 9:47 ` David Vrabel [this message]
2014-06-18 14:23 ` [Xen-devel] [PATCH 1/2] xen-netfront: fix oops when disconnected from backend Wei Liu
2014-06-18 9:47 ` [PATCH 2/2] xen-netfront: recreate queues correctly when reconnecting David Vrabel
2014-06-18 14:25 ` [Xen-devel] " Wei Liu
2014-06-21 23:15 ` [PATCHv1 0/2 net] xen-netfront: fix resume regressions in 3.16-rc1 David Miller
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=1403084848-12872-2-git-send-email-david.vrabel@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xenproject.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).