diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-11-21 10:26:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-21 13:09:43 -0500 |
commit | db739ef37f07a1a12e388dbaec225d9d9d5d6ded (patch) | |
tree | 1afa3b07aa5e8ef07d5753fd9ee8c5290357c382 /drivers/net/xen-netback | |
parent | aec6f90d412fe30b88fdea3d1880734c837e15d4 (diff) |
xen-netback: stop the VIF thread before unbinding IRQs
If the VIF thread is still running after unbinding the Tx and Rx IRQs
in xenvif_disconnect(), the thread may attempt to raise an event which
will BUG (as the irq is unbound).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r-- | drivers/net/xen-netback/interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index b78ee10a956a..2329cccf1fa6 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c | |||
@@ -461,6 +461,9 @@ void xenvif_disconnect(struct xenvif *vif) | |||
461 | if (netif_carrier_ok(vif->dev)) | 461 | if (netif_carrier_ok(vif->dev)) |
462 | xenvif_carrier_off(vif); | 462 | xenvif_carrier_off(vif); |
463 | 463 | ||
464 | if (vif->task) | ||
465 | kthread_stop(vif->task); | ||
466 | |||
464 | if (vif->tx_irq) { | 467 | if (vif->tx_irq) { |
465 | if (vif->tx_irq == vif->rx_irq) | 468 | if (vif->tx_irq == vif->rx_irq) |
466 | unbind_from_irqhandler(vif->tx_irq, vif); | 469 | unbind_from_irqhandler(vif->tx_irq, vif); |
@@ -471,9 +474,6 @@ void xenvif_disconnect(struct xenvif *vif) | |||
471 | vif->tx_irq = 0; | 474 | vif->tx_irq = 0; |
472 | } | 475 | } |
473 | 476 | ||
474 | if (vif->task) | ||
475 | kthread_stop(vif->task); | ||
476 | |||
477 | xenvif_unmap_frontend_rings(vif); | 477 | xenvif_unmap_frontend_rings(vif); |
478 | } | 478 | } |
479 | 479 | ||