• Paul Durrant's avatar
    xen-netback: clear vif->task on disconnect · 67fa3660
    Paul Durrant authored
    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 ea732dff
     (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: default avatarPaul 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: default avatarWei Liu <wei.liu2@citrix.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>