From: Wei Liu <wei.liu2@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: <xen-devel@lists.xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Ian Campbell <ian.campbell@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCHv1 net] xen-netback: stop the VIF thread before unbinding IRQs
Date: Thu, 21 Nov 2013 15:50:31 +0000 [thread overview]
Message-ID: <20131121155031.GA30889@zion.uk.xensource.com> (raw)
In-Reply-To: <1385047569-23622-1-git-send-email-david.vrabel@citrix.com>
On Thu, Nov 21, 2013 at 03:26:09PM +0000, David Vrabel wrote:
> From: David Vrabel <david.vrabel@citrix.com>
>
> 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>
Thanks
Wei.
> ---
> 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 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);
> }
>
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-11-21 15:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 15:26 [PATCHv1 net] xen-netback: stop the VIF thread before unbinding IRQs David Vrabel
2013-11-21 15:50 ` Wei Liu [this message]
2013-11-21 18:17 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131121155031.GA30889@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox