xen-netback: stop the VIF thread before unbinding IRQs
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 22 17:59:07 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=db739ef37f07a1a12e388dbaec225d9d9d5d6ded
Commit: db739ef37f07a1a12e388dbaec225d9d9d5d6ded
Parent: aec6f90d412fe30b88fdea3d1880734c837e15d4
Author: David Vrabel <david.vrabel at citrix.com>
AuthorDate: Thu Nov 21 15:26:09 2013 +0000
Committer: David S. Miller <davem at davemloft.net>
CommitDate: Thu Nov 21 13:09:43 2013 -0500
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 at citrix.com>
Acked-by: Wei Liu <wei.liu2 at citrix.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
drivers/net/xen-netback/interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index b78ee10..2329ccc 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)
if (netif_carrier_ok(vif->dev))
xenvif_carrier_off(vif);
+ if (vif->task)
+ kthread_stop(vif->task);
+
if (vif->tx_irq) {
if (vif->tx_irq == vif->rx_irq)
unbind_from_irqhandler(vif->tx_irq, vif);
@@ -471,9 +474,6 @@ void xenvif_disconnect(struct xenvif *vif)
vif->tx_irq = 0;
}
- if (vif->task)
- kthread_stop(vif->task);
-
xenvif_unmap_frontend_rings(vif);
}
More information about the linux-mtd-cvs
mailing list