From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, <xen-devel@lists.xen.org>,
<netdev@vger.kernel.org>
Cc: Ian Campbell <ian.campbell@citrix.com>,
Philipp Hahn <hahn@univention.de>
Subject: Re: [Xen-devel] [PATCH for stable 3.10] xen-netback: drop SKB from internal queue if frontend is disconnected
Date: Fri, 11 Jul 2014 14:57:03 +0100 [thread overview]
Message-ID: <53BFED2F.7070002@citrix.com> (raw)
In-Reply-To: <1405084112-8134-1-git-send-email-wei.liu2@citrix.com>
On 11/07/14 14:08, Wei Liu wrote:
>
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -720,6 +720,16 @@ static void xen_netbk_rx_action(struct xen_netbk *netbk)
> vif = netdev_priv(skb->dev);
> nr_frags = skb_shinfo(skb)->nr_frags;
>
> + /* In rare case that frontend is disconnected while
> + * there's still SKBs stuck in netback internal
> + * rx_queue, drop these SKBs.
> + */
> + if (unlikely(!vif->ring_mapped)) {
> + dev_kfree_skb(skb);
> + xenvif_put(vif);
> + continue;
> + }
Is this racy? The ring may be unmapped after the test but before we put
responses on it.
David
next prev parent reply other threads:[~2014-07-11 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 13:08 [PATCH for stable 3.10] xen-netback: drop SKB from internal queue if frontend is disconnected Wei Liu
2014-07-11 13:15 ` Ian Campbell
2014-07-11 13:28 ` Wei Liu
2014-07-11 13:30 ` Ian Campbell
2014-07-11 13:43 ` Wei Liu
2014-07-11 13:57 ` David Vrabel [this message]
2014-07-11 16:38 ` [Xen-devel] " Wei Liu
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=53BFED2F.7070002@citrix.com \
--to=david.vrabel@citrix.com \
--cc=hahn@univention.de \
--cc=ian.campbell@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--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;
as well as URLs for NNTP newsgroup(s).