]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: clear vif->task on disconnect
authorPaul Durrant <Paul.Durrant@citrix.com>
Tue, 3 Dec 2013 14:06:25 +0000 (14:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Dec 2013 16:49:30 +0000 (11:49 -0500)
commit632935c4beb58abb1d839429182ebdfa05526362
tree4c607aeaa3de8da2b7b3de8d2457195c643281cb
parent5bafdc8fb13782d97af39b0bb640c5a0a5cff0d5
xen-netback: clear vif->task on disconnect

xenvif_start_xmit() relies on checking vif->task for NULL to determine
whether the vif is ready to accept packets. The task thread is stopped in
xenvif_disconnect() but task is not set to NULL. Thus, on a re-connect the
check will give a false positive.

Also since commit 9147a5c2ea544928e4dd44d9b6770248c092356e (Handle backend
state transitions in a more robust way) it should not be possible for
xenvif_connect() to be called if the vif is already connected so change the
check of vif->tx_irq to a BUG_ON() and also add a BUG_ON(vif->task).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/interface.c