summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/netback.c
diff options
context:
space:
mode:
authorIgor Druzhinin <igor.druzhinin@citrix.com>2017-03-10 21:36:22 +0000
committerDavid S. Miller <davem@davemloft.net>2017-03-12 23:44:43 -0700
commitb17075d5c1988b83f840d272c795ac17d57ce804 (patch)
treeb760831992b881a42e1c3ad3990855ac8a989088 /drivers/net/xen-netback/netback.c
parente37791ec1ad785b59022ae211f63a16189bacebf (diff)
downloadtalos-obmc-linux-b17075d5c1988b83f840d272c795ac17d57ce804.tar.gz
talos-obmc-linux-b17075d5c1988b83f840d272c795ac17d57ce804.zip
xen-netback: fix race condition on XenBus disconnect
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/netback.c')
-rw-r--r--drivers/net/xen-netback/netback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index f9bcf4a665bc..602d408fa25e 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -214,7 +214,7 @@ static void xenvif_fatal_tx_err(struct xenvif *vif)
netdev_err(vif->dev, "fatal error; disabling device\n");
vif->disabled = true;
/* Disable the vif from queue 0's kthread */
- if (vif->queues)
+ if (vif->num_queues)
xenvif_kick_thread(&vif->queues[0]);
}
OpenPOWER on IntegriCloud