summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2014-06-18 10:47:27 +0100
committerDavid S. Miller <davem@davemloft.net>2014-06-21 16:14:26 -0700
commit765418694bc99d91e71ede6d2889a6328da137fe (patch)
tree379f7e2a8c59940934396ef059f72417d254072d /drivers
parenta705a906c617b1c389729829c0a160f179d043bf (diff)
downloadlinux-stable-765418694bc99d91e71ede6d2889a6328da137fe.tar.gz
linux-stable-765418694bc99d91e71ede6d2889a6328da137fe.tar.bz2
linux-stable-765418694bc99d91e71ede6d2889a6328da137fe.zip
xen-netfront: fix oops when disconnected from backend
xennet_disconnect_backend() was not correctly iterating over all the queues. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/xen-netfront.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 5a7872ac3566..daaf1e56e41e 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);